Hi,
I have a form that is made up of divs that are shown or hidden dependant on what has been selected in the form.
In the first div I have a dropdown box with 2 options and the first one is selected by default.
On the 5th div I have a button that when pressed needs to check what was selected in the dropdown box and do different this dependant on what that selection was.
Here is the code i am using that does not seem to work:
It always behaves as though the selected index is 1 regardless of what the actual selection is.
Can anyone help
Cheers
Techu4
I have a form that is made up of divs that are shown or hidden dependant on what has been selected in the form.
In the first div I have a dropdown box with 2 options and the first one is selected by default.
On the 5th div I have a button that when pressed needs to check what was selected in the dropdown box and do different this dependant on what that selection was.
Here is the code i am using that does not seem to work:
Code:
var frm2 = document.forms[0];
if(frm2.joint.selectedIndex == 0) {
showLayer('page15');
}
if(frm2.joint.selectedIndex == 1) {
showLayer('page6');
}
It always behaves as though the selected index is 1 regardless of what the actual selection is.
Can anyone help
Cheers
Techu4