Code

Added function changeSubselectState.
authorjanw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 27 May 2005 12:09:05 +0000 (12:09 +0000)
committerjanw <janw@594d385d-05f5-0310-b6e9-bd551577e9d8>
Fri, 27 May 2005 12:09:05 +0000 (12:09 +0000)
Use it to dim form elements that are childs of selectboxes.

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@478 594d385d-05f5-0310-b6e9-bd551577e9d8

html/include/focus.js

index 48f7e738e4000ec31d06adec95e822ed4efcc60c..5dd1392656976bbe0d1c20284c147b930cdd7893 100644 (file)
@@ -39,6 +39,14 @@ function changeSelectState(triggerField, myField) {
   }
 }
 
+function changeSubselectState(triggerField, myField) {
+  if (document.getElementById(triggerField).checked == true){
+         document.getElementById(myField).disabled= false;
+  } else {
+         document.getElementById(myField).disabled= true;
+  }
+}
+
 document.onkeydown= keyDown; // work together to analyze keystrokes
 if (netscape){
   document.captureEvents(Event.KEYDOWN|Event.KEYUP);