PDA

View Full Version : Double combo box bug !!!!


waps
08-13-2002, 02:42 PM
Hi people,

I have got a double combo box on my site. When you select an option in the first box the values in the second change accordingly. If i select an option in the first box then one from the second it will take me to a cetain page. That all works fine but the thing is, when you click the back button on the browser. The box values get muddled up.

Does anyone know what I am on about ??? :confused:

What I was thinking was is there a way to set the values of the combo box back to a default after an option in the second box has been selected and the page forwarded.


Hope someone understands !!! Not sure I do now !!! He he :p

Thanks

beetle
08-13-2002, 02:57 PM
Well, I suspect you have something like this:<script>
function jumpPage(nUrl) {
document.forms['sel1'].selectedIndex = 0;
top.location.href=nUrl';
}
</script>

<form>
<select name="sel1">
<option>Option1</option>
<option>Option2</option>
</select>

<select name="sel2" onChange="jumpPage(this.options[this.selectedIndex].value)">
<option value="page1.htm">Option1</option>
<option>value="page2.htm"</option>
</select>
</form>Oh, and for the record, SELECT objects are NOT combo boxes.