on 08-12-2009 11:23 PM
Hi Experts,
when I click on a button, i want to preselect a radiobutton using javascript.
I am using below code to get the instance of the radiobutton in the javascript, but I am unable to select the radiobutton.
var theRadio = eval(func(grpId + htmlb_radiobuttonmodifier.substring(3,7)+ "1"));
Thanks in advance
Hi,
Try alerting "(theRadio.type)".
If you are getting the proper checkbox instance then the alert should display "checkbox". If that much is working then checking the checkbox is as simple as
var theRadio = eval(func(grpId + htmlb_radiobuttonmodifier.substring(3,7)+ "1"));
if(theRadio)
theRadio.checked = true
By the way what does the function "func" do?
Regards,
Satyajit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.