tags:

views:

15

answers:

2

Guys check this out : http://www.codetoad.com/html/buttons/image_submit_button.asp

You'll notice then when you click the button it is taking you to

http://www.codetoad.com/html/buttons/image_submit_button.asp?x=118&y=22

How do i remove this "x=118&y=22" at the end.Because my form is a get form and because of this its altering my code..

Please help

+1  A: 

That's the standard behaviour of <input type="image" /> elements and I don't think you can change it.

You could instead use the <button> tag:

<button type="submit">
  <img src="someimage.jpg" />
</button>

Edit: If you don't want it to look like a button, you can use CSS to remove the button styling:

button {
  border-style: none;
  background-color: transparent;
}
casablanca
Thats adds an image to the button it doesn't change the button itself !
5416339
See my edit for how to remove the button styling.
casablanca
+1 because I didn't know that this was possible.
Bobby
A: 

I think this is the behaviour and insead of fighting with this behaviour what you can do is apply css on input type=submit. with background-image property.


< input type=submit id='submitButton' value='submit' />


<style>
#submitButton {
  width: 100px;
  height: 55px;
  padding: 55px 0 0;
  margin: 0;
  border: 0;
  background: transparent url(pathtoyourimage/image.gif) no-repeat center top;
  overflow: hidden;
  cursor: pointer; /* hand-shaped cursor */
  cursor: hand; /* for IE 5.x */
}
</style>

sushil bharwani
Can you tell me in detail ??
5416339
i have modified my response for further details u asked for.
sushil bharwani