![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi, I'm completely green when it comes to Javascript - I can kind of understand it, but don't understand the finer logic of it (I'm more an ASP person, a'la VBScript, VB, etc). Why doesn't this JS work? SCRIPT TYPE="text/javascript" function FlipFlop(){ if(SearchH.R1.checked)(SearchH.R2.checked=0); if(SearchH.C5.checked==1)(SearchH.C2.checked=1)(Se archH.C5.checked=0); if(SearchH.C6.checked==1)(SearchH.C3.checked=1)(Se archH.C6.checked=0); if(SearchH.C7.checked==1)(SearchH.C4.checked=1)(Se archH.C7.checked=0); } function FlipFlop2(){ if(SearchH.R2.checked)(SearchH.R1.checked=0); if(SearchH.C2.checked==1)(SearchH.C5.checked=1)(Se archH.C2.checked=0); if(SearchH.C3.checked==1)(SearchH.C6.checked=1)(Se archH.C3.checked=0); if(SearchH.C4.checked==1)(SearchH.C7.checked=1)(Se archH.C4.checked=0); } Essentially, there are two radio buttons on an ASP generated form. If the user chooses one radio button, the other is deselected. (Onclick call FlipFlop, or FlipFlop2). This bit works. Associated with the radio buttons are two groups of three check boxes. The user can choose any or all of the three check boxes associated with each radio button. A nicety would be if the radio button selection changes, the check box selections should carry to the other group of three check boxes. This is the bit that only partially works. If any ONE of the check boxes is checked, the opposite and equal checkbox is checked if the user chooses the other radio button. Unfortunately, if two or more check boxes are selected, only the FIRST selected check box's logic is transferred. Any other checkbox states are ignored. Like I said - I know veeeery little about JS, and I'll wager the above is full of errors. Be gentle! Any help appreciated! Mark if(SearchH.C5.checked==1)(SearchH.C2.checked=1)(Se archH.C5.checked=0); |
#3
| |||
| |||
|
|
Hi, I'm completely green when it comes to Javascript - I can kind of understand it, but don't understand the finer logic of it (I'm more an ASP person, a'la VBScript, VB, etc). Why doesn't this JS work? snip |
![]() |
| Thread Tools | |
| Display Modes | |
| |