473,472 Members | 2,155 Online
Bytes | Software Development & Data Engineering Community
Create 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_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
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 2806
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_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
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_status" value="in">
<input type="submit" value="switch status">

--
Kris
kr*******@xs4all.netherlands (nl)
"We called him Tortoise because he taught us" said the Mock Turtle.
Jul 20 '05 #2
Kris <kr*******@xs4all.netherlands> wrote in message news:<kr*****************************@news1.news.x s4all.nl>...
In article <a7**************************@posting.google.com >,
<input type="hidden" name="awol_status" 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_status" value="out">
<button type="submit" name="awol_status" value="in"
onclick="this.innerText='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_status" value="in">
<button type="submit" name="awol_status" value="out"
onclick="this.innerText='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.google.co m...
Kris <kr*******@xs4all.netherlands> wrote in message news:<kr*****************************@news1.news.x s4all.nl>...
In article <a7**************************@posting.google.com >,


<input type="hidden" name="awol_status" 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_status" value="out">
<button type="submit" name="awol_status" value="in"
onclick="this.innerText='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_status" value="in">
<button type="submit" name="awol_status" value="out"
onclick="this.innerText='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_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
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********@hotmail.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
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...
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...
3
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...
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: 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
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,...
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
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...
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...
0
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 projectplanning, coding, testing,...
1
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...
0
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...
0
muto222
php
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.