how can i disable submit button on form until all required fileds filled and also filed correctly ... second i want to know how to disable element such as textbox or drop down menu or button based on checkbox value hmmmm on more thing how can i change the color of table row based on check box value
Announcement
Collapse
No announcement yet.
disable element in form
Collapse
X
-
For your 2nd problem:
Code:<head> <script type="text/javascript">> <!--hide function dis() { document.formName.ElementName.disabled='true' } //--> </script> <script type="text/javascript">> <!--hide function open() { document.formName.Elementname.disabled='false' } //--> </script> <form name="formName"><input type=radio onClick="dis()"> <input type=radio onClick="open()"> <input type=button name="ElementName" disabled="false"> </form>
Code:<script type="text/javascript"> <!--hide function doit() { if (document.formName.checkBoxName.selected="true") {document.formName.elementYouWantToAccessName.disabled=false}; else {document.formName.elementYouWantToAccessName.disabled=true} } //--> </script>
For your third problem just do <input type=checkbox onClick="document.getElementById('tableCellId').bgColor='blue'">
...or you can use a submit button by using another "if selected" type function.Last edited by Bobo; Feb 21, 2004, 01:00 AM.Oh, was I supposed to put something here? ........
Comment