By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,867 Members | 1,964 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,867 IT Pros & Developers. It's quick & easy.

Button Element and Internet Explorer 6.0

P: n/a
Dom
Hi,

I wanted to use the Button Element to submit a form like this example:

<form action="/test.exe" method="post">
<button id="ID_BUTTON_OK" name="_WEB_EVENT_HANDLER_" type="submit"
value="ID_BUTTON_OK">Login</button>
</form>
If I submit the form, the _WEB_EVENT_HANDLER_ gets the value "Login",
but as defined in HTML 4.01 the value which is submitted should be the
value field in the Button Element ("ID_BUTTON_OK" in this case).
I'm using the newest Internet Explorer Series 6. At the Mozilla
Browser it works perfectly!

Is the Internet Explorer doing this thing totally wrong??? Or am I
doing this thing wrong? Thank's for help!

Dominik
HTML 4.01
---------------------------------------------------------
17.5 The BUTTON element
<!ELEMENT BUTTON - -
(%flow;)* -(A|%formctrl;|FORM|FIELDSET)
-- push button -->
<!ATTLIST BUTTON
%attrs; -- %coreattrs, %i18n, %events
--
name CDATA #IMPLIED
value CDATA #IMPLIED -- sent to server when
submitted --
type (button|submit|reset) submit -- for use as form button
--
disabled (disabled) #IMPLIED -- unavailable in this context
--
tabindex NUMBER #IMPLIED -- position in tabbing order --
accesskey %Character; #IMPLIED -- accessibility key character
--
onfocus %Script; #IMPLIED -- the element got the focus --
onblur %Script; #IMPLIED -- the element lost the focus
--

---------------------------------------------------------
Jul 20 '05 #1
Share this Question
Share on Google+
11 Replies


P: n/a
Dom wrote:
I wanted to use the Button Element to submit a form
You might want to consider <input type="submit"> instead.

http://www.htmlhelp.com/reference/ht...ms/button.html
<form action="/test.exe" method="post">
<button id="ID_BUTTON_OK" name="_WEB_EVENT_HANDLER_"
type="submit" value="ID_BUTTON_OK">Login</button>
</form>

If I submit the form, the _WEB_EVENT_HANDLER_ gets the value "Login"


url?

--
Brian (remove ".invalid" to email me)
http://www.tsmchughs.com/
Jul 20 '05 #2

P: n/a
On 3 Aug 2004 07:24:34 -0700, dh***@gmx.de (Dom) wrote:
Hi,

I wanted to use the Button Element to submit a form like this example:

<form action="/test.exe" method="post">
<button id="ID_BUTTON_OK" name="_WEB_EVENT_HANDLER_" type="submit"
value="ID_BUTTON_OK">Login</button>
</form>
If I submit the form, the _WEB_EVENT_HANDLER_ gets the value "Login",
but as defined in HTML 4.01 the value which is submitted should be the
value field in the Button Element ("ID_BUTTON_OK" in this case).
I'm using the newest Internet Explorer Series 6. At the Mozilla
Browser it works perfectly!

Is the Internet Explorer doing this thing totally wrong??? Or am I
doing this thing wrong? Thank's for help!


As I recall, yes... Internet Explorer gets this wrong. There's not
much you can do about it. (I assume they went a bit too far reusing
code from <input type="submit" ...>.)

For now, a workaround is to give each button a different name and just
check for the presence of that name, disregarding the value. Note,
though, that many browsers won't send *any* of your buttons as
successful controls if the form is submitted by "hitting enter" in a
text field rather than triggering the button, so you'll have to pick a
safe default case for when none of them appear at all.

All the best,
-Claire
Jul 20 '05 #3

P: n/a
Dom
Ok thank you Claire. But do you think Microsoft will fix it?
As I recall, yes... Internet Explorer gets this wrong. There's not
much you can do about it. (I assume they went a bit too far reusing
code from <input type="submit" ...>.)

For now, a workaround is to give each button a different name and just
check for the presence of that name, disregarding the value. Note,
though, that many browsers won't send *any* of your buttons as
successful controls if the form is submitted by "hitting enter" in a
text field rather than triggering the button, so you'll have to pick a
safe default case for when none of them appear at all.

Jul 20 '05 #4

P: n/a
CJM
Microsoft are not going to fix anything much in IE... They are apparently
rewriting it for Longhorn, and it will be quite a change (maybe even for the
better??!), but AFAIK, there will generally only be bug/security fixes until
then.

Chris
Jul 20 '05 #5

P: n/a

CJM wrote:
Microsoft are not going to fix anything much in IE... They are apparently
rewriting it for Longhorn, and it will be quite a change (maybe even for the
better??!), but AFAIK, there will generally only be bug/security fixes until
then.


And AFAIK we have to wait two more years for the new IE and Longhorn?
I also understand that the new IE (ver. 7.0?) will not be able to
install to older systems, like XP?

--
/Arne
Jul 20 '05 #6

P: n/a
"CJM" <cj*****@yahoo.co.uk> wrote:
Microsoft are not going to fix anything much in IE... They are apparently
rewriting it for Longhorn, and it will be quite a change (maybe even for the
better??!), but AFAIK, there will generally only be bug/security fixes until
then.


There are rumours that the Longhorn version will not offer better/more
standards support: http://ln.hixie.ch/?start=1088526392&count=1

Bottom of the page, the paragraph that starts with "In other news,"

--
Spartanicus
Jul 20 '05 #7

P: n/a
CJM
>
And AFAIK we have to wait two more years for the new IE and Longhorn?
I also understand that the new IE (ver. 7.0?) will not be able to
install to older systems, like XP?

--
/Arne


That is essentially it...! Obviously, with Microsoft you cant be sure until
it is sat in front of you.

It seems an odd decision, since it might be the catalyst we need to
encourage people to move across to other browsers.

Chris
Jul 20 '05 #8

P: n/a
Spartanicus wrote:
There are rumours that the Longhorn version will not offer
better/more standards support


MS employees seem to be announcing the fact.

http://channel9.msdn.com/ShowPost.as...ID=11157#11157

After protesting that MS does realize that support for W3C
recommendations is important to web developers, and bemoaning the lack
thereof in IE, MS employee DMassey adds this priceless gem:

"Microsoft has always made it clear however that we will not support
every detail of every W3C recommendation simply because it is a W3C
recommendation."

I'm amused by his tone, as if it were merely complaints from an
anal-retentive standards crowd.

--
Brian (remove ".invalid" to email me)
http://www.tsmchughs.com/
Jul 20 '05 #9

P: n/a
Brian wrote:

"Microsoft has always made it clear however that we will not support
every detail of every W3C recommendation simply because it is a W3C
recommendation."


In other words, the answer to the question of whether submit buttons
will ever work correctly in IE, the answer is no.

Jul 20 '05 #10

P: n/a
Keith Bowes wrote:
Brian wrote:
"Microsoft has always made it clear however that we will not
support every detail of every W3C recommendation simply because it
is a W3C recommendation."

Just to be clear: I did not write that, I quoted it. DMassey wrote it.
In other words, the answer to the question of whether submit buttons
will ever work correctly in IE, the answer is no.


The answer is "not necessarily".

--
Brian (remove ".invalid" to email me)
http://www.tsmchughs.com/
Jul 20 '05 #11

P: n/a
Brian wrote:
"Microsoft has always made it clear however that we will not
support every detail of every W3C recommendation simply because it
is a W3C recommendation."

Just to be clear: I did not write that, I quoted it. DMassey wrote it.


I understand that. I'm just a tad hostile toward MS for not fixing
these little but annoying bugs in *years*. It wasn't meant to be personal.

Jul 20 '05 #12

This discussion thread is closed

Replies have been disabled for this discussion.