Re: Attribute value of <button> element
- From: "Jozef Izso" <JozefIzso@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 27 Jun 2005 01:32:01 -0700
I'm not telling about "nonbracked" area (AKA element content, by the way).
I defined atributed value="" of <button> element like this:
<button value="login">Sign On</button>
So, when I want the value of the value="" attribute, in JS I will use:
button.getAttribute('value');
But this method doesn't return the right value "login" (which I defined) but
it returns "Sign On".
And I'm confused with this behaviour. (I really doesn't know any other way
of explanation of this problem.)
"Galen" wrote:
> In news:3E1CB5F9-90E2-4CFE-847C-38503DDB9ADD@xxxxxxxxxxxxx,
> Jozef Izso <JozefIzso@xxxxxxxxxxxxxxxxxxxxxxxxx> had this to say:
>
> My reply is at the bottom of your sent message:
>
> > I've localized application to German, Slovak and Czech thus I can't
> > relly on button's innerText value.
> >
> > Internet Explorer badly sendes submit button's innerText property
> > instead of value="" atribute.
> >
> > But why it changes the value="login" defined by me in code to
> > value="Prihlasit"?? If it doens't do this, I can before submiting
> > <form> change innerText property to value of value="" attribute. But
> > whit this behaviour I can't.
> >
> > So I need to resolve this problem: How to stop IE to change MY
> > attributes by his crazy mind and will?? I've defined values of HTML
> > tags atributes for some reason, so WHY IE is changing them???
>
> I still don't see where it's changing the attribute - it's using exactly
> what you told it to use. The text in the non-bracketed area is what will be
> displayed in ANY browser AFAIK. It's the standards not an IE
> function/malfunction? The value is what the button will be doing when
> pressed, the text that's not bracketed will be what's shown to the user.
> It's not IE it's all browsers. You can just as easily swap out the value as
> "login" with the word parsnips and open it with any standards compliant
> browser and it's still going to show the data within the non-bracketed
> sections. It shows as it's given - HTML is good like that.
>
> Galen
> --
>
> "And that recommendation, with the exaggerated estimate of my ability
> with which he prefaced it, was, if you will believe me, Watson, the
> very first thing which ever made me feel that a profession might be
> made out of what had up to that time been the merest hobby."
>
> Sherlock Holmes
>
>
>
.
- References:
- Attribute value of <button> element
- From: Jozef Izso
- Re: Attribute value of <button> element
- From: Galen
- Re: Attribute value of <button> element
- From: Jozef Izso
- Re: Attribute value of <button> element
- From: Galen
- Re: Attribute value of <button> element
- From: Jozef Izso
- Re: Attribute value of <button> element
- From: Galen
- Attribute value of <button> element
- Prev by Date: Re: Internet Security
- Next by Date: Re: How to block a list of websites?
- Previous by thread: Re: Attribute value of <button> element
- Next by thread: Re: Attribute value of <button> element
- Index(es):