473,791 Members | 2,861 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

<BUTTON> intertext submitted instead of value in IE6

The following button definition works fine in Mozilla where the value
"in" is assigned to "awol_statu s". In Internet Explorer 6.0.2800.1106
on Win 2K the value "switch status" is assigned to "awol_statu s". This
is not what I want :-(

<button type="submit" name="awol_stat us" value="in">swit ch
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
instead of the inline text if the attribute was present.

Has IE6 actually re-introduced this IE4 bug?

I need a button that is labelled differently to the value it passes,
is there any way of doing this for IE6?

Regards,
Fred
Jul 20 '05 #1
6 2822
In article <a7************ **************@ posting.google. com>,
fr*******@my-deja.com (Fred Phase) wrote:
The following button definition works fine in Mozilla where the value
"in" is assigned to "awol_statu s". In Internet Explorer 6.0.2800.1106
on Win 2K the value "switch status" is assigned to "awol_statu s". This
is not what I want :-(

<button type="submit" name="awol_stat us" value="in">swit ch
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
instead of the inline text if the attribute was present.

Has IE6 actually re-introduced this IE4 bug?

I need a button that is labelled differently to the value it passes,
is there any way of doing this for IE6?


<input type="hidden" name="awol_stat us" value="in">
<input type="submit" value="switch status">

--
Kris
kr*******@xs4al l.netherlands (nl)
"We called him Tortoise because he taught us" said the Mock Turtle.
Jul 20 '05 #2
Kris <kr*******@xs4a ll.netherlands> wrote in message news:<kr******* *************** *******@news1.n ews.xs4all.nl>. ..
In article <a7************ **************@ posting.google. com>,
<input type="hidden" name="awol_stat us" value="in">
<input type="submit" value="switch status">


Actually, I just realised something. I already have set awol_status as
a hidden attribute so the above solution wouldn't work. The button is
meant to flip a state. Here is the solution I used after a bit of
research.

<input type="hidden" name="awol_stat us" value="out">
<button type="submit" name="awol_stat us" value="in"
onclick="this.i nnerText='in'"> switch
status</button>

The default is "out" unless the button is pressed. This is
conditionally generated by PHP. When flipped, the HTML output changes
to...

<input type="hidden" name="awol_stat us" value="in">
<button type="submit" name="awol_stat us" value="out"
onclick="this.i nnerText='out'" >switch
status</button>
Jul 20 '05 #3
Just a word of caution on this. Make sure to test your changing button text code on Netscape because it is generally
very unhappy about it when AccessKey is involved.
Csaba
"Fred Phase" <fr*******@my-deja.com> wrote in message news:a7******** *************** **@posting.goog le.com...
Kris <kr*******@xs4a ll.netherlands> wrote in message news:<kr******* *************** *******@news1.n ews.xs4all.nl>. ..
In article <a7************ **************@ posting.google. com>,


<input type="hidden" name="awol_stat us" value="in">
<input type="submit" value="switch status">


Actually, I just realised something. I already have set awol_status as
a hidden attribute so the above solution wouldn't work. The button is
meant to flip a state. Here is the solution I used after a bit of
research.

<input type="hidden" name="awol_stat us" value="out">
<button type="submit" name="awol_stat us" value="in"
onclick="this.i nnerText='in'"> switch
status</button>

The default is "out" unless the button is pressed. This is
conditionally generated by PHP. When flipped, the HTML output changes
to...

<input type="hidden" name="awol_stat us" value="in">
<button type="submit" name="awol_stat us" value="out"
onclick="this.i nnerText='out'" >switch
status</button>

Jul 20 '05 #4
Fred Phase wrote:
The following button definition works fine in Mozilla where the value
"in" is assigned to "awol_statu s". In Internet Explorer 6.0.2800.1106
on Win 2K the value "switch status" is assigned to "awol_statu s". This
is not what I want :-(

<button type="submit" name="awol_stat us" value="in">swit ch
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
instead of the inline text if the attribute was present.

Has IE6 actually re-introduced this IE4 bug?

I need a button that is labelled differently to the value it passes,
is there any way of doing this for IE6?


When I reported this "bug" to MS, they informed me that it isn't a bug because
it's the documented behavior
<URL:http://msdn.microsoft. com/workshop/author/dhtml/reference/objects/button.asp>
(see Remarks)

I don't know if IE 5 ever submitted the value instead of innerText, or if MS
merely "fixed" the bug by changing the docs, but earlier documentation did state
that the value attribute would be used if it was present.

--
Steve

I don't want to achieve immortality through my work. I want to achieve it
through not dying. -Woody Allen
Jul 20 '05 #5
"Steve Fulton" <ce********@hot mail.com> wrote in message news:<F5******* ********@news20 .bellglobal.com >...

When I reported this "bug" to MS, they informed me that it isn't a bug because
it's the documented behavior
<URL:http://msdn.microsoft. com/workshop/author/dhtml/reference/objects/button.asp>
(see Remarks)

I don't know if IE 5 ever submitted the value instead of innerText, or if MS
merely "fixed" the bug by changing the docs, but earlier documentation did state
that the value attribute would be used if it was present.


This must be the most blatent case of "it's not a bug it's a feature"
I've come across :-)

This makes <button> only as useful as <input> for text buttons, with
the inner text just doing what the value would otherwise do. It seems
to defeat the whole point of it.

Well, according to...
http://www.w3.org/TR/REC-html40/inte...ms.html#h-17.5
The _value_ is what is sent to the server when submitted.

I hope IE becomes as obsolete as NS4.7 really soon!

Thanks,
Fred
Jul 20 '05 #6
On Sun, Jul 20, Steve Fulton inscribed on the eternal scroll:
When I reported this "bug" to MS, they informed me that it isn't a
bug because it's the documented behavior
Sounds like another case of DAB from the Empire [1]
<URL: http://msdn.microsoft. com/workshop/author/dhtml/reference/objects/button.asp> (see Remarks)
Ah yes. See also their assertion "This object is defined in HTML
4.0", with a link to the W3C specification.

Which states clearly enough that a <button> of type "submit" sends the
_value_ to the server on submission. So it seems the MS documentation
claims two mutually incompatible things.
I don't know if IE 5 ever submitted the value instead of innerText,
or if MS merely "fixed" the bug by changing the docs, but earlier
documentation did state that the value attribute would be used if it
was present.


Ho hum. Another piece of evidence that this Operating System
Component disqualifies itself as a WWW browser.

Sigh.

[1] "Documented As Broken". Or maybe it's just BAD ("broken as
documented") - the distinction is a subtle one...
Jul 20 '05 #7

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

Similar topics

1
2181
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...
15
28959
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
5967
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
9603
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; }
3
2723
by: Lāʻie Techie | last post by:
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>
2
2613
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
2288
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
1268
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
1677
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
9515
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
10426
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
10207
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
10154
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,...
0
9993
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
5558
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4109
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
3713
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2913
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.