[thelist] Jump to entry in select box?

Mike.Hodgson Mike.Hodgson at citywatch.co.uk
Wed Nov 22 09:25:00 CST 2000


Hi guys,

I'm trying to fumble my way round a bit of javascript and am wondering it's
possible to jump (using onClick in a checkbox) to a specific entry in a
pulldown list based on the *value* of the entry.  I know I can jump to a
specific entry in the options *array* using something like:

<form name="form1">
	<input type="checkbox"
onClick="document.form1.pulldown.options[2].selected=true">
	<select name="pulldown">
		<option value="">choose one...
		<option value="2">Mick
		<option value="37">Sean
		<option value="9">Chris
		<option value="1">Mark
	</select>
	<input type="submit">
</form>

which will jump to "Sean".  Is there a way I can jump to "Chris" by
referring to the number "9"???

I hope that made sense.
Cheers,
Mick
PS: a cc to my email address would be great as I'm on the digest.

 
----------------------------------------------------------------
      Visit our Internet site at http://www.citywatch.co.uk
 
Any views expressed in this message are those of the individual
sender, except where the sender specifically states them to be
the views of Citywatch Ltd.





More information about the thelist mailing list