473,757 Members | 9,145 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Q: possible Bug in IE 6 post more than succesfull control when using button tag

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:

"A successful control is "valid" for submission. Every successful
control has its control name paired with its current value as part of
the submitted form data set. A successful control must be defined
within a FORM element and must have a control name. ..."

And

"If a form contains more than one submit button, only the activated
submit button is successful."

see at http://www.w3.org/TR/html401/interac...ssful-controls
So they speak of "submit button". The tag "<input type='submit'
name='myButt' ...>" supposed to be the same as "<button type='submit'
name="myButt' ..>foo</button>" accept for richer layout:
So i assume that only the clicked <button> supposed to be posted. Well
mozilla 1.7 does it right. IE 6 makes it wrong.

It is getting really annoying with this old (2001 ?!) Internet
Explorer 6.0

Here is an exmaple:
-------------------------------------------------------------------

<FORM action="" method="post">

<button type="submit" name="IEmyButt"
value="A is firstButton">A</button>

<button type="submit" name="IEmyButt"
value="B is secondButton">B </button>
</FORM>

-------------------------------------------------------------------
PHP show post values
<?
//php
echo "<span style='color:re d'>Post<pre>"; print_r($_POST) ; echo
"</pre></span>";
?>

-------------------------------------------------------------------
Thanks.

Best Regards
Jul 20 '05 #1
3 1996

"Tom Asken" <as*****@gmx.ne t> wrote in message
news:8a******** *************** ***@posting.goo gle.com...
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:


<snip>

Make sure you dont have overlapping form elements?
Jul 20 '05 #2
Gazing into my crystal ball I observed as*****@gmx.net (Tom Asken) writing
in news:8a******** *************** ***@posting.goo gle.com:
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


Confirmed - http://www.intraproducts.com/beta/buttons.asp
--
Adrienne Boswell
Please respond to the group so others can share
http://www.arbpen.com
Jul 20 '05 #3
"Tom Asken" <as*****@gmx.ne t> schrieb im Newsbeitrag
news:8a******** *************** ***@posting.goo gle.com...

[...]
Here is an exmaple:
-------------------------------------------------------------------

<FORM action="" method="post">

<button type="submit" name="IEmyButt"
value="A is firstButton">A</button>

<button type="submit" name="IEmyButt"
value="B is secondButton">B </button>
</FORM>

-------------------------------------------------------------------
PHP show post values
<?
//php
echo "<span style='color:re d'>Post<pre>"; print_r($_POST) ; echo
"</pre></span>";
?>


If you use PHP you can easily work around this using different button names:

<?php
if(isset($_POST['button1'])) $value = $_POST['button1'];
else if(isset($_POST['button2'])) $value = $_POST['button2'];
else $value = "my custom value";
?>

Like that you also have no problem when no button is clicked at all and the
form is submitted by hitting enter.

HTH
Markus
Jul 20 '05 #4

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

Similar topics

2
1923
by: Asp Help | last post by:
I'm working on a ASP applicatition to create Windows 2000 users. Because I don't want everybody to have access to the site I've changed te security in IIS 5.0 which runs on a windows 2000 Sp4 server: The security on the site is mainly anonymous. The anonymous account has been changed to an account which has the right permissions. The security on one asp page (GetUser.asp) is changed to only "Windows Integrated". A User that access the...
20
2512
by: CHIN | last post by:
Hi all.. here s my problem ( maybe some of you saw me on other groups, but i cant find the solution !! ) I have to upload a file to an external site, so, i made a .vbs file , that logins to the site, and then i have to select the file to upload.. i used sendkeys.. and i worked perfect.. BUT ... the computer must be locked for security ( obviusly ) reazons.. so..i think this probable solutions to unlock the computer and run the...
7
2003
by: Matt | last post by:
Hi all, Not very sure about this. I have one button (not a submit button) will "post" partial page(form) info to another url(the user will also redirect to this url :-). I dont' want to change the webpage interface, so how can I POST partial form info? by using a tmp url??? TIA
2
12561
by: Matt | last post by:
When we submit the form data to another page, we usually do the following: <form action="display.aspx" method="post"> will submit the form data and open display.asp in the current browser <form action="display.aspx" method="post" target="_blank"> will submit the form data and open display.asp in a new browser
6
3798
by: guoqi zheng | last post by:
In a regular html form, when user press "enter" key, the form will be submitted. However, in ASP.NET web form, a form will only be submitted (post back) when a special button is clicked. Many user get used to click "enter" key to submit a form. How can I use "enter" key to submit/postback in ASP.NET. Thank, Guoqi Zheng
21
8156
by: Ben | last post by:
Hello I have frames set up in an asp.net application and need one frame to refresh another. Seeing as events need to be registered at the time the page is sent from the server, I was wondering if I could place a hidden button in a frame that would have the attribute to refresh the other. I would need code to "invoke" the onclick event (ie i need code to click the button). is this possible? thanks.
8
2035
by: =?Utf-8?B?V2ViQnVpbGRlcjQ1MQ==?= | last post by:
I the page knows there was a cross post back. but i can not find the control. (asp.net 3.5) calling page has a master calling control: <asp:Button ID="btnSendAlert" runat="server" Text="Go" onclick="btnSendAlert_Click" PostBackUrl="ItemUpLoadAdmin.aspx" CommandArgument="5" />
0
9298
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
10072
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9906
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...
1
9885
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7286
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5172
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
5329
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3829
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3399
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.