This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes IE doesn't return value of submit button? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "IE doesn Watch "IE doesn New topic

IE doesn't return value of submit button?

Allen Williams
Ranch Hand

Joined: Sep 04, 2006
Posts: 136
Here is a form (it is the output of a jsp, but that's irrelevant at this point). This was cut and pasted directly from Internet Explorer's View->Document Source menu:

Note at the end where I've bolded the button. Here is a fragment of the TrbMgr servlet this form calls:

And, here is what the log prints out:

TribeMgr: todo= New Tribe

In other words, IE is sending the text on the button and not the "value='btnvalue'" from the <input> tag.

Mozilla works just fine, and I don't think I've ever seen this. Has anyone else? Is this a quirk in IE I don't know about? I did a google search and haven't found anything so far.


-------<br />Thanks & regards,<br />anw
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63548

You've found yet another instance where Internet Explorer does not follow the HTML 4 Specification: BUTTON specification.

Both IE6 and IE7 exhibit this behavior with your sample code.

[ March 27, 2007: Message edited by: Bear Bibeault ]

[Asking smart questions] [About Bear] [Books by Bear]
I agree. Here's the link:
subject: IE doesn't return value of submit button?
jQuery in Action, 3rd edition