473,659 Members | 2,680 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

<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.p hp" method="GET">
<button type="submit" name="mode" value="criteria ">Return to
Criteria</button>
<button type="submit" name="mode" value="page1">G o to Page 1</button>
<button type="submit" name="mode" value="page2">G o 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&mo de=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 2714
=?UTF-8?b?TMSByrtpZSB UZWNoaWU=?=
<laie@win_remov e_get_nospam_so lutions.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
2175
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 client select "Cancel" then i want to ignore the action and if "OK" selected then i want to Execute a Server side Event or Procedure. Now what is happening here is for "Delete1" button (in my code) even if Client Select Cancel it is still...
6
2820
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 "awol_status". This is not what I want :-( <button type="submit" name="awol_status" value="in">switch status</button> I have searched Google for this issue and I read of this being a problem in IE 4 but in IE5 the value="" attribute would be used
15
28948
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="..." value="..."> with <input type="submit" ...> the only name-value values submitted (pushed into the query string) is the one of the submit button that was pushed (if you have many of them). Ex:
2
5960
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 I get rid of that? If the old <INPUT> button has been deprecated in favor of <BUTTON>, have all it's button functions been duplicated? Thanks for any help,
3
9590
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 button { width: 8em; font-size: something; }
2
2608
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 the presence or lack of a DTD impact the answer? -- Christopher Benson-Manica | I *should* know what I'm talking about - if I ataru(at)cyberspace.org | don't, I need to know. Flames welcome.
4
2281
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 lower area of the form. on the lower area i have validators for validating input.
1
1260
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 button on an .aspx page have either a 'save' caption and 'save' commandname or a 'close' caption and a 'close' commandname The caption necessity is obvious, but the commandname is important to because the event stub that is tied to that button (just...
4
1668
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
8427
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, well explore What is ONU, What Is Router, ONU & Routers main usage, and What is the difference between ONU and Router. Lets take a closer look ! Part I. Meaning of...
0
8332
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
8851
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
8627
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5649
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
4175
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...
1
2750
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
2
1975
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1737
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.