April 24, 200818 yr Hi Guys, I'm trying to validate my form and loop thorugh each checkbox to see if it has been checked. My html is below, Im trying to get the length of the checkbox array by using: alert(document.form.transport.length); However, it keeps saying it has no properties, can anyone please help? Thankyou <ffform name="form" action="#" method="post" onSubmit="return CheckFieldBlank()"> <input id="Bycycle" type="checkbox" name="transport" value="Bycycle" /> <input id="Motorscooter" type="checkbox" name="transport" value="Motorscooter" /> <input id="Motorbike" type="checkbox" name="transport" value="Motorbike" /> <input id="Car" type="checkbox" name="transport" value="Car" /> </form>
April 24, 200818 yr Have a look at these.... Very Nice Script. http://www.plus2net.com/javascript_tutoria...ckbox-array.php http://www.netevolution.co.uk/scripts.asp?ID=25
Create an account or sign in to comment