By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
460,045 Members | 1,384 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 460,045 IT Pros & Developers. It's quick & easy.

onclick does not work with Input type=image

P: n/a
Please help... For some odd reason onclick is not working with and
<input type="image"> but works fine on an <input type="button">....

This does not work:
<input TYPE="image" src="go.gif"
onclick="thisthis(form.text1.value,form.select1.va lue)">

But this works fine:
<input TYPE="button" width="20" VALUE="SEARCH"
onclick="thisthis(form.text1.value,form.select1.va lue)">

Any help would be much appreciated... Thanks
Jul 20 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Lee
Wayne said:

Please help... For some odd reason onclick is not working with and
<input type="image"> but works fine on an <input type="button">....


The odd reason is that the input of type image was intended
specifically to submit the form. If you want to do something
other than submit a form, use the onClick handler of an image,
or of a Link containing an image.

Jul 20 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.