|
|
|||||||||
|
|||||||||
|
|||||||||
| |
||
| |||||||||
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Check boxes and javascript
I have a list of settings which are activated when the checkbox is checked. In some cases, a setting may only be used if another setting is activated. Does anyone know how I can make a check box unchecked AND use the disable property unless the other mandatory setting is checked, and then switch back if that mandatory setting is unchecked?
Hope that made sense.... Thanks |
|
#2
|
||||
|
||||
|
You can use a series of JS commands to check and uncheck boxes, and set the display to "none" or "". Place SPAN tags around the checkboxes so you can show or hide the elements.
For example: <span id="InforceCheckbox"><input type="checkbox" name="InforceOnly"></span> if ( document.QueryForm.OtherCheckbox.checked = true {//uncheck and hide document.QueryForm.InforceOnly.checked = false; InforceCheckbox.style.display="none"; } else { //show as visible InforceCheckbox.style.display=""; } |
| Viewing: ASP Free Forums > Programming > HTML, JavaScript And CSS Help > Check boxes and javascript |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|