Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Forms and IE

Status
Not open for further replies.

axman505

Technical User
Joined
Jun 20, 2001
Messages
489
Location
US
Does anyone know why IE doesnt send this value

Code:
<input type="image" src="../images/use.jpg" name="go" value="continue" />

This works fine in firefox.
 

Probably because the image input is used to submit the form, IE doesn't think the value is worth sending.

To get around this, you could use a regular image with an HREF around it... This would only be an issue if you need users with no JavaScript to be able to submit the form.

Alternatively, you could just send the value "continue" in a hidden form field instead... Or just never send it at all if it's not ever going to change.

Hope this helps,
Dan
 
The reason is that [tt]<input type="image">[/tt] tags are really intended for use as image maps, rather than as alternative button images. When you click somewhere on your image input, the browser submits the form and sends two values holding the x & y coordinates that were clicked, something like

go.x=120
go.y=112

The spec is typically vague, but it certainly doesn't require the browser to send the [tt]value[/tt] attribute back to the server. Indeed, doing so might be interpreted by some as a bug.

-- Chris Hunt
Webmaster & Tragedian
Extra Connections Ltd
 
In my experience, IE thinks that anything that can make your life easier is a bug :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top