[thelist] Using an image as a submit button w/ JS
Shaun M. Anderson
ShaunAnderson at smarttech.com
Tue Mar 20 12:29:19 CST 2001
I'm trying to use an image as a go button for a jumplist, and unfortunately
it only works with IE. Needless to say this isn't a good thing.
The Code:
<form name="jumpform">
<select name="jumplist">
<option value="salesdescriptions.asp#promo_cd" selected>Promotional
CD-ROMs</option>
<option value="salesdescriptions.asp#education_demo">Education
Demonstration Tools</option>
</select>
<!-- This works in IE with the image. -->
<img valign="top"
src="/images/go.gif"
onClick="top.location=document.jumpform.jumplist.options[document.jumpform.j
umplist.selectedIndex].value" align="absmiddle">
<1-- This one works with IE and Netscape, but no image as the button -->
<input type="button" border="0" name="Button" value="Go"
onClick="top.location=document.jumpform.jumplist.options[document.jumpform.j
umplist.selectedIndex].value">
</form>
I guess I've got two questions. 1) How can I get it to work ;-) and 2) Why
can't I just use the onClick from the form button in the image tag?
Apparently that'd be too easy...
As you may have noticed, I have minimal experience with JS.
Thanks,
Shaun
More information about the thelist
mailing list