source: trunk/exodus/static/showandhide.js@ 6496

Last change on this file since 6496 was 6496, checked in by roland, 16 years ago

Worked on field validation if forms. This is complete.
Except for channelplanning, on which Lodewijk is working.

(Almost) no unittests are written for forms.py
And some code cleaning needs to be done as some parts
are kinda hackish.

File size: 589 bytes
Line 
1var ShowAndHide = {
2 init: function() {
3 document.getElementById('id_type').onchange = new Function('ShowAndHide.change(); return false;');
4 var newValue = document.getElementById('id_type').value;
5 if (newValue != 'eth') {
6 CollapsedFieldsets.show(1);
7 }
8 },
9 change: function() {
10 var newValue = document.getElementById('id_type').value;
11 if (newValue == 'eth') {
12 CollapsedFieldsets.hide(1);
13 } else {
14 CollapsedFieldsets.show(1);
15 }
16 }
17}
18
19addEvent(window, 'load', ShowAndHide.init);
Note: See TracBrowser for help on using the repository browser.