Wednesday, January 6, 2010

Array Check box validation

Hi all,

Array Check box validation ...

<script type="text/javascript">
function validate_array_checkbox(form_object,checkbox_name){
var total=0;
for(var i=0; i < form_object[checkbox_name].length; i++)

return true;
alert("Please select your place") ;
return false;
<form method="post" onSubmit="return validate_array_checkbox(this,'pl[]');">
<input type="checkbox" name="pl[]" value="Chennai" />Chennai
<input type="checkbox" name="pl[]" value="Madurai" />Madurai
<input type="checkbox" name="pl[]" value="Delhi" /> Delhi
<input type="submit" value="Validate" />

No comments:

Post a Comment

Select All,Select None,Select Invertion

Select All Select None Invert Selection

Add to basket JQUERY

Image Fly To Basket
Add to cart
Code take from jbasket fly to basket site,,,,