473,326 Members | 2,128 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

onclick does not work with Input type=image

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
1 21011
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Mike | last post by:
when I use <input type=button id=Test> the following code works myform.Test.disabled = true When I change the input box to type image none of the properties are available. I get the message...
3
by: Csaba Gabor | last post by:
When I click on the image form element <INPUT type=image name=point src="map.png"> point.x and point.y values get submitted to the server specifying where on the image I have clicked. Is there...
7
by: b2b2u | last post by:
I can't seem to get a form to submit using an image !? <input type="image" src="submit.gif"> Any body have this problem? Is it choking on the x/y coordinates? If so, what can be done about it?...
21
by: cman | last post by:
does anyone know why i can't generate images with: header("Content-type:image/jpeg"); imagejpeg($img_number); i've tried different examples but i always get a text output as if the header...
1
by: blumoosie | last post by:
I have the following code: //This is at the top before the </head> tag <script> goLocations = new Array( "#", "first_option.doc", "second_option.doc", "#" ); </script>
3
by: jackiepatti | last post by:
QUESTION: I have a web page containing a form that contains an image instead of a submit button, e.g. <form name='myform' action='get' method='otherpage.asp'> <input type='image'...
8
by: John | last post by:
Hi Pasrt of HTML - <div class='button'><input type='image' src='/images/check1.jpg'></input></div> Part of CSS - ..button {background-image: url(/images/check1.jpg); background-repeat:
2
by: Peter Oliphant | last post by:
The Image class allows loading a bitmap from a graphic file. So far I've gotten it to work with JPG and BMP files. What other graphic file formats are supported in this way? Is this fixed based...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.