Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
02-20-2007, 12:17 PM #1
- Join Date
- Feb 2007
- Thanked 0 Times in 0 Posts
getting checkbox Value checked or not
In my jsp page in a table writing a while loop under which i generated my checkboxes as following --- is my code for check box.
<input type="checkbox" class="vAVONInputCheckbox" name="C<%=list%>" value="OK" onClick="fnSetValue('C<%=list%>')" >
Then in JS i have written a function on click of check box
if( (eval("document.BAPP."+val).checked) == true )
eval("document.BAPP."+val).value = "true";
eval("document.BAPP."+val).value = "false";
ok while loading it is alwayz unchecked so it is giving me false value only....
i need help i hav tried this for half day
i think am calling function at wrong place
plz help me its urgent
02-20-2007, 04:52 PM #2
If you want to use the eval for this you'll have to insert at least 1 letter before the val and the .value should be inside the eval too:
eval("document.BAPP.e" + val + ".value")