Syntax
document.form.checkbox.handleEvent(event)
The handleEvent() method provides a way to invoke a check box's event handler, even though the event never happened.
Argument Associated with the handleEvent() Method
event | An Event object to be handled |
<html>
<form name="orderForm">
<input type="checkbox"
name="v6"
onClick="alert('V6')">V6<br>
<input type="checkbox"
name="cylinder4"
onClick="displayNote(event)">4 Cylinder<hr>
Step 2:
<input type="button"
value="Submit Order"
name="orderButton"
onClick="alert('Your order has been submitted')">
</form>
<script language="JavaScript">
<!--
function displayNote(event)
{
alert("V6?");
document.orderForm.v6.handleEvent(event);
}
-->
</script>
</html>