473,405 Members | 2,338 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

<button> in IE

I'm having two troubles with the <button> tag in Internet Explorer on
Windows (I don't have access to a Mac to test it). It works as expected
in Mozilla both on Windows and Linux.

Here is the shortest example which exhibits the unexpected behavior:

<form action="index.php" method="GET">
<button type="submit" name="mode" value="criteria">Return to
Criteria</button>
<button type="submit" name="mode" value="page1">Go to Page 1</button>
<button type="submit" name="mode" value="page2">Go to Page 2</button>
</form>

Obviously there are other form elements which influence the behavior of
criteria, pages 1 and 2.

First problem is that IE sends in the HTML between the
<button> tags as the value instead of the attribute. Second problem is
that when _any_ <button> is clicked, IE passes in the values of _all_
<button>s in that form.

In other words, no matter what I click, my query string will always be:
?mode=Return+to+Criteria&mode=Go+to+Page+1&mode=Go +to+Page+2

Has anyone else come across either of these two bugs? How likely is
Microsoft to work on them if I report them (which brings up the question
of IE bugzilla's location)?

La'ie Techie
Jul 23 '05 #1
3 2705
=?UTF-8?b?TMSByrtpZSBUZWNoaWU=?=
<laie@win_remove_get_nospam_solutions.com> wrote:
I'm having two troubles with the <button> tag in Internet Explorer on
Windows
No wonder. It's fundamentally broken (though at times, it might work for
some users some of the time).
<button type="submit" name="mode" value="criteria">Return to
Criteria</button>
Use
<input type="submit" name="mode" value="Return to Criteria">
instead, and modify the form handler accordingly (to deal with the
name=value pair that will be generated).

If you wish to change the appearance of the submit button,
1) think twice - it is _good_ that submit buttons look boring, since
they look familiar and are recognized as submit buttons immediately
2) think again, if you still want to play with the appearance, and
3) if you really must, use CSS to style the appearance.
First problem is that IE sends in the HTML between the
<button> tags as the value instead of the attribute. Second problem
is that when _any_ <button> is clicked, IE passes in the values of
_all_ <button>s in that form.
Yes, those are two of the fundamental problems. Moreover, there are
probably _still_ some browsers that don't recognize <button> at all but
have no difficulties with <input>.
How likely is Microsoft to work on them if I report them


The probability might not be exactly zero, but hardly much bigger either,
and, moreover, the next version of IE will be available in not-so-near
future and only as embedded into a new OS-like product, which won't run
on your current computer, not to mention mine.

--
Yucca, http://www.cs.tut.fi/~jkorpela/
Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html

Jul 23 '05 #2
On Mon, 6 Sep 2004, [UTF-8] L??ie Techie wrote:
I'm having two troubles with the <button> tag in Internet Explorer on
Windows
No surprises there, I'm afraid...
Has anyone else come across either of these two bugs?
("Features", I suppose. Grumble.)
How likely is Microsoft to work on them if I report them


Negative, I would think. Take a look at
http://msdn.microsoft.com/workshop/a...cts/button.asp
and in particular the statement at the foot of the page:

| Standards Information
|
| This object is defined in HTML 4.0

A less suspicious person might suppose this to be a message from MS to
the reader, saying "we implemented the HTML 4.0 specification". But
no: the description of their implementation, just a few lines above
under "Remarks", describes an implementation that is in flagrant
contravention to the HTML/4.0 interworking requirements.

"Documented As Broken".

My serious advice to you would be not to use this in a WWW context.

(Although, some contributors have developed dual-pathed scripts to
cope with both WWW-compatible browsers /and/ that browser-like
operating system component... It's "do-able", but is it worth doing?)

As far as functionality is concerned, "input type=submit" is
universally supported wherever there is any support for forms.
There's a few hints and tips on its use (the most frequently asked are
those relating to "what happens when the user submits a form by
hitting Enter instead of using one of the submit buttons provided").

As far as cosmetics are concerned, well, submission of a form can be
quite a significant action in a WWW context: users get accustomed to
what a "submit button" (in the sense of "input type=submit") looks
like on their browser, and IMHO it's bad manners to interfere with
that for purely cosmetic reasons. Please don't get the idea that I
have any objection to good visual design - far from it (though I make
no claim to be any good at doing it myself); but in certain instances
it's better to go along with the regular design that this user is
accustomed to, and I'd suggest that this is just one of those "certain
instances".

Jukka has some good pages on HTML forms; I also cover some topics on
my pages, e.g start at
http://ppewww.ph.gla.ac.uk/~flavell/www/trysub.html (although they're
probably in need of a workover to take out detailed references to some
obsolete browser versions).
Jul 23 '05 #3
Thanks Alan and Jukka!

Before posting my original message, I did switch to <input type="submit">
tags with different names,as well as a <input type="hidden" name="mode">
to keep track of the current mode (not all "submit"s changed the mode).

I also tried to google for this bug, but with "button" being such a common
term I didn't find anything relevant and the first 5 pages (all links on
these pages were about buttons in the toolbar). I figured the regulars of
this NG would prove helpful, and indeed you have.

Mahalo nui loa,
La'ie Techie

Jul 23 '05 #4

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

Similar topics

1
by: RSB | last post by:
Hi Every one, Having tuff time to make this work .. i want to have a button and on my form say Delete button. So once i click on it i want to confirm "Are you sure?" on the Client Side and if...
6
by: Fred Phase | last post by:
The following button definition works fine in Mozilla where the value "in" is assigned to "awol_status". In Internet Explorer 6.0.2800.1106 on Win 2K the value "switch status" is assigned to...
15
by: Mattia | last post by:
Hi! I have a <form> that can be submitted thruogh three buttons and I need to tell witch one was pressed when the form was submitted. I now do it with 3 <input type="submit" name="..."...
2
by: not 2 swift | last post by:
I thought I would update an old page on which I had used a <INPUT TYPE=image ...> with a <BUTTON><IMG SRC=...></BUTTON> The problem is that <BUTTON> always provides a shadow/emboss effect. Can...
3
by: phil_gg04 | last post by:
Dear All, I am trying to influence the font size for a <button> element using CSS, but failing for IE. Works ok in FF. IE seems to ignore all attempts; for example with this: div.whatever...
2
by: Christopher Benson-Manica | last post by:
According to http://www.w3schools.com/tags/tag_button.asp, the type attribute of the <button> tag is optional. Is the UA at liberty to choose any type it wishes if the attribute is omitted? Does...
4
by: z. f. | last post by:
Hi, I'm having an aspx page with a server form. i have a grid with a delete button and below the grid, another area with inputs for inserting new values and an "add" button for submiting the...
1
by: CharlesA | last post by:
Hi folks, first off, I'm using Framwork 1.1 with ASP.net and C# I'm trying to do something quite basic and can't figure out why it won't behave without going into massive details I want a...
4
by: Poornima N | last post by:
my question is can we apply the CSS to upload button like BROWSE ? if so hw can we apply?
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
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,...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.