My question is, I want the div with the id of "option2show" to be hidden unless the user has selected option 2 in the dropdown box.
If the user has selected option 1 then nothing will happen, however iff option 2 has been selected then the option2 div will appeaar. I would like this to happen before any submit buttons are press, so i guess onblur of the dropdown box.
I have got this coe to work, however I would also like it to behave in a way that when the user selects option 1 after selecting option 2 the box then dissapears.
I have got this coe to work, however I would also like it to behave in a way that when the user selects option 1 after selecting option 2 the box then dissapears.
Is this possible?
Thanks
That was not in the original request. It is possible, but it is best if you think through what you want before you ask for it.
Code:
function SBoxAction(info) { // alert(info);
$_('option2show').style.display = 'none';
if (info == 2) { toggle('option2show'); }
// can remove 'toggle()' function if following used instead of above
// if (info == 2) { $_('option2show').style.display = 'block'; }
$_('SBox').selectedIndex = 0;
}
Bookmarks