views:

247

answers:

5

Hey guys I want a form to be submitted but it just won't work in IE. Altough in mozilla and other browsers it is working. The code:

<input type="image" name="zoeken" src="knop_go.jpg" value="zoek" alt="zoek" />

What's the solution for this problem ?

+1  A: 

A possible workaround would be a regular button with a css style for the image:

<form action="blah.aspx" method="post">
<input type="submit" class="button" name="zoeken" value="zoek" />
</form>

And in css:

.button {
    border: 0px;
    background: url("./knop_go.jpg");   
    width: 100x;
    height: 60px;
}
edosoft
@edosoft >> elegant solution :-)
Izmoto
A: 

There shouldn't be anything wrong with using an - can you provide a demo page?

meder
A: 

You could try this inside a form tag (in fact, this will work):

<button type="submit">
  <img src="btnaceptar.jpg"/>
</button>
eKek0
+2  A: 

It does work — it just doesn't send the value, just the co-ordinates.

If you are testing to see if that button each clicked, look to see if an x or y co-ordinate is set (as well as testing for the value).

David Dorward
yes, but if I use isset() on the var, it doesn't work, in FF it works...
Vince2doom
The variables generated for the co-ordinates are the ones with "x" and "y" in them. Since the value isn't sent, the name for the value data isn't sent either.
David Dorward
A: 

OK, update, it works IF I press the button, but if I press enter, it still doesn't work...

fixed it by checking if another field isset, now it works...

But I saw if you don't press the submit button, he doesn't send a value.

Vince2doom