pa********@hotm ail.com (Paul) writes:
How do I on the change event of a list box open a new url in the
current window in which the list box resides. I'm not using frames.
I assume you mean a select element, not a "list box".
<select onchange="locat ion.href=this.o ptions[this.selectedIn dex].value">
<option value="http://www.google.com" >Google!</option>
<option value="http://www.google.com" >Google again!</option>
</select>
However(!), you should not make a destructive update in an onchange
handler for a select element. People navigating with the keyboard will
not be able to reach anything but the first option. It also breaks with
the expected behavior of a select element: something you change, and
makes it act more like, e.g., a button: something that makes things
happen. It is bad for usability to go against the users' expectations.
/L
--
Lasse Reichstein Nielsen -
lr*@hotpop.com
Art D'HTML: <URL:http://www.infimum.dk/HTML/randomArtSplit. html>
'Faith without judgement merely degrades the spirit divine.'