Connecting Tech Pros Worldwide Forums | Help | Site Map

<BUTTON> intertext submitted instead of value in IE6

Fred Phase
Guest
 
Posts: n/a
#1: Jul 20 '05
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

Kris
Guest
 
Posts: n/a
#2: Jul 20 '05

re: <BUTTON> intertext submitted instead of value in IE6


In article <a7e330bc.0307190635.2a13b829@posting.google.com >,
fredphase@my-deja.com (Fred Phase) wrote:
[color=blue]
> 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?[/color]

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

--
Kris
kristiaan@xs4all.netherlands (nl)
"We called him Tortoise because he taught us" said the Mock Turtle.
Fred Phase
Guest
 
Posts: n/a
#3: Jul 20 '05

re: <BUTTON> intertext submitted instead of value in IE6


Kris <kristiaan@xs4all.netherlands> wrote in message news:<kristiaan-9464D5.16544419072003@news1.news.xs4all.nl>...[color=blue]
> In article <a7e330bc.0307190635.2a13b829@posting.google.com >,[/color]
[color=blue]
>
> <input type="hidden" name="awol_status" value="in">
> <input type="submit" value="switch status">[/color]

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>
Csaba2000
Guest
 
Posts: n/a
#4: Jul 20 '05

re: <BUTTON> intertext submitted instead of value in IE6


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" <fredphase@my-deja.com> wrote in message news:a7e330bc.0307191034.15982f3@posting.google.co m...[color=blue]
> Kris <kristiaan@xs4all.netherlands> wrote in message news:<kristiaan-9464D5.16544419072003@news1.news.xs4all.nl>...[color=green]
> > In article <a7e330bc.0307190635.2a13b829@posting.google.com >,[/color]
>[color=green]
> >
> > <input type="hidden" name="awol_status" value="in">
> > <input type="submit" value="switch status">[/color]
>
> 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>[/color]


Steve Fulton
Guest
 
Posts: n/a
#5: Jul 20 '05

re: <BUTTON> intertext submitted instead of value in IE6


Fred Phase wrote:[color=blue]
> 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?[/color]

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


Fred Phase
Guest
 
Posts: n/a
#6: Jul 20 '05

re: <BUTTON> intertext submitted instead of value in IE6


"Steve Fulton" <cerberus40@hotmail.com> wrote in message news:<F5wSa.38$Wh.13489@news20.bellglobal.com>...[color=blue]
>
> 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.[/color]

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
Alan J. Flavell
Guest
 
Posts: n/a
#7: Jul 20 '05

re: <BUTTON> intertext submitted instead of value in IE6


On Sun, Jul 20, Steve Fulton inscribed on the eternal scroll:
[color=blue]
> When I reported this "bug" to MS, they informed me that it isn't a
> bug because it's the documented behavior[/color]

Sounds like another case of DAB from the Empire [1]
[color=blue]
> <URL:[/color]
http://msdn.microsoft.com/workshop/author/dhtml/reference/objects/button.asp>[color=blue]
> (see Remarks)[/color]

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.
[color=blue]
> 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.[/color]

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...
Closed Thread


Similar HTML / CSS bytes