473,785 Members | 2,291 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Button Element and Internet Explorer 6.0

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_O K" name="_WEB_EVEN T_HANDLER_" type="submit"
value="ID_BUTTO N_OK">Login</button>
</form>
If I submit the form, the _WEB_EVENT_HAND LER_ 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;|F ORM|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
11 3100
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_O K" name="_WEB_EVEN T_HANDLER_"
type="submit" value="ID_BUTTO N_OK">Login</button>
</form>

If I submit the form, the _WEB_EVENT_HAND LER_ gets the value "Login"


url?

--
Brian (remove ".invalid" to email me)
http://www.tsmchughs.com/
Jul 20 '05 #2
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_O K" name="_WEB_EVEN T_HANDLER_" type="submit"
value="ID_BUTT ON_OK">Login</button>
</form>
If I submit the form, the _WEB_EVENT_HAND LER_ 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
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
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

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
"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
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
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
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

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
1997
by: Tom Asken | last post by:
Short version: IE 6.0 wrongly posts <button ..> value. Internet Explorer should only post the value of the clicked submit button - but IE 6 posts the value of several submit buttons if they have the same name Long version: I have a form with several Buttons with the same name and different values. According to the w3c only successful controls supposed to be submitted:
3
2832
by: lee | last post by:
Hello I need some javascript code I've written to handle 2 values from an HTML form. I've been successful using the "label" attribute (I've simplied the example below): <input type="radio" name="group1" value="3" label="Cheese" checked>Cheese<br>
3
9877
by: JCharlie | last post by:
hi all. I´ve a problem with x button on internet explorer. Some users fills an informative form, they push x button and i don´t save the information. How can i disable the x button on internet explorer? I could a close window button and i could save the information when the users push this close button. Thank you.
7
5290
by: Stefan Mueller | last post by:
How can I set the Name of a button? I tried xelement = document.createElement("input") xelement.type = "button" xelement.name = "MyButton" but it does not work with the Internet Explorer (Mozilla is fine). I don't get an error message but if I try to address this button by its name e.g. document.getElementsByName("MyButton").style.visibility = "hidden" I get with the Internet Explorer (Mozilla works fine) the following error message:
2
2025
by: Takuya Matsumoto | last post by:
Hi to all, I was wondering whether this was possible/how it was possible. I would like to add a custom button to Internet Explorer ReBar. I believe it is called ReBar or CoolBar; what I mean is the bar in the Internet Explorer where you have "Back" button. Towards the right, MSN Messenger had added a button on my computer, for example. What I would like to do is to add a button and when the user presses the
7
2958
by: Stewart Saathoff | last post by:
Hello, Does anyone know how to open an Internet Explorer URL with a specified Path when someone clicks a URL?
7
2276
by: jab3 | last post by:
Hello. I'm wondering if someone can answer something I'm sure has been answered a thousand times before. I am apparently just too dumb to find the answer. :) I've found information about the 'onstop' event, but it's not behaving as expected. (And it also seems to be a proprietary attribute) That is, my defined function is not being run when I click stop. I've 'inserted' it like this: <body onstop="stopped_clicked()"> And the function...
8
3459
by: Richard Lionheart | last post by:
Hi All, The test page follows. Clicking the button brings up a message box announcing that the browser had entered the function intended to populate the text area. Dismissing the message box leads to the message box being populated with a dozen lines. At least, that's what happens with Firefox. With IE, clicking the button does nothing. Any idea why?
2
1800
by: TheSouthLondonSlasher | last post by:
Thank you in advance to anyone who may be able to help. This is my first attempt at JavaScript, so I apologize if I've done something blatantly stupid in the below code. Basically, I have a form with 4 checkboxes, a submit button, and a cancel button. When the user clicks submit, the page should build the URL, and submit the form, as long as one or more boxes is checked. When the user clicks cancel, they should be redirected back to...
0
9647
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9491
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10163
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8988
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6744
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5397
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5532
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3668
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2894
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.