Query by Biplab Mitra:
I
need some help from you regarding MOSS.
I
need to enable/disable some fields with the selection of radio buttons.
How
can I add JavaScript to the fields in the list? As I am unable to get the field
ID.
Even
I need to add some logic for calculating some fields with the selection of the
radio buttons.
Solution by Mario Fernandes
-
Open the List. ( I am
assuming its Employee list.)
-
Pick any one record & go in
edit mode.
-
Right click on the page &
View Source
-
Search for <form
element - note down the “name” value
-
Search for the field you wish
to make read only say “EmployeeName”. Check <input element next to it –
note down the “name” value
-
Copy the URL of this
EditForm.aspx
-
Open Sharepoint Designer, File à
Open à paste the url you copied
-
Go to code window.
-
Locate <IMG
src="/_layouts/images/blank.gif"
-
Just after this <Img>
element put this code ---
document.formname.inputfieldname
-
<script type="text/javascript"
language="javascript">document.aspnetForm.ctl00$m$g_bf411c27_b525_4df6_a7f3_a64ee5b5aef3$ctl00$ctl04$ctl01$ctl00$ctl00$ctl04$ctl00$ctl00$TextField.disabled="true";</script>
-
Save the form. Refresh the
page.
-
There you go
Synergetics is a premium brand in the Indian IT
industry in the area of people
competency development engaged in delivering it thru its
training and consulting interventions; primarily focusing on their productivity
with regards to the project and deliverables on hand . Its primary
differentiator has been its solution
centric approach and its comprehensive client focused service portfolio.
Be the first to rate this post
- Currently 0/5 Stars.
- 1
- 2
- 3
- 4
- 5