On my page I have two check boxes in a form, and a Submit button. I want the Submit button to not appear or at least be greyed out if none of the checkboxes is checked. Is this possible with VBScript? Possibly JavaScript?
One problem that I saw with code above is if you hit the reset button it clears the check boxes; however, it did not turn the 'submit' button back off. I add the resetIt() function to allow for this situation.
Here is the VBScript Version of what you are looking for...
<HTML>
<HEAD>
<script language=vbscript>
function checkbox1_onclick()
If Test.checkbox1.checked = True then
Test.submitMe.style.display=""
Else
Test.submitMe.style.display="none"
End If
end function
</script>
</Head>
<BODY>
<form ID=Test>
<input type=CheckBox ID=CheckBox1>
<input type=Submit Style="Display: none;" ID="SubmitMe" Value="Submit">
</form>
</BODY>
</HTML>
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.