Pages

Search This Blog

Saturday, March 1, 2008

VBScript: disabled and enabled button

<html>
<head>
<title>VBScript Example: disabled and enabled button</title>
<SCRIPT Language="VBScript">
sub enableButton()
if frm.chkbox_1.checked = true then
frm.btn_1.disabled = false
else
frm.btn_1.disabled = true
end if

end sub
</SCRIPT>
</head>
<body>
<form name=frm>

<input type="checkbox" name="chkbox_1" value="ON" onclick="enableButton()"></input>
<input type="submit" value="I Agree" name="btn_1" disabled></input>

</form>
</body>
</html>

No comments: