| Author: Manigandan 04 Jul 2009 | Member Level: Gold | Rating:  Points: 2 |
Hi Macson,
Consider for Example that user must check the box before he goes to next page,
Now you are going to validate it,
<script type="text/javascript"> function validate(form) {
if(!document.form1.agree.checked){alert("Please Read the guidelines and check the box below"); return false; }
return true; } </script>
Thanks, Mani http://manicse85.blogspot.com/
|
| Author: R.Jaya kumar (JK) 04 Jul 2009 | Member Level: Diamond | Rating:  Points: 2 |
hi
try this link
http://www.dotnetspider.com/resources/29957-CheckBox-Validates.aspx
Thanks and Regards Jayakumar
Do not forget to Rate the post...
|
| Author: Raj 06 Jul 2009 | Member Level: Gold | Rating:  Points: 2 |
Hi,
Try this,
function fnValidate() { var chk = docment.getElementById("chkId"); if(chk) { if(!chk.checked) alert("validation message); } }
Thanks, Raj
|
| Author: Ramesh Sahu 06 Jul 2009 | Member Level: Gold | Rating:  Points: 2 |
///try this for check box Validation function fnCheckboxChecked(obj) { var checked = obj.checked; if (checked == true) { return true; } else { return false; } }
Thanking You
Ramesh Sahoo
|
| Author: Devendra 06 Jul 2009 | Member Level: Gold | Rating:  Points: 2 |
<script type="text/javascript"> function validate(form) {
if(!document.form1.agree.checked){alert("Please Read the guidelines and check the box below"); return false; }
return true; } </script>
|