faqts : Computers : Programming : Languages : JavaScript : Forms : Checkboxes

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

16 of 47 people (34%) answered Yes
Recently 3 of 10 people (30%) answered Yes

Entry

how to validate check boxs on form submit event

Jul 8th, 2002 03:39
Laurent Gomez, alena tutor,


This works and was tested under IE5 and NN6




<html>
<head>
	<script language="javascript">
		function CheckThem() {
			document.FormName.MyCheckBox.checked = true;
		}
	</script>
</head>
<body>

	<form name="FormName" method="get" action="SomePage.html" 
OnSubmit="CheckThem();">

	<input type="checkbox" name="MyCheckBox">The CheckBox<br>

	<input type="submit" value="Send">

	</form>

</body>
</html>