[Project_owners] help button checkbox

Andrey Gromyko andrey at gromyko.name
Tue Mar 7 00:46:00 EST 2006


Not sure about the precedence table. So, may be

this.label = (this.checked ? 'enabled' : 'disabled');
or, even more straight:
this.checked ? this.label = 'enabled' : this.label = 'disabled';

--
Andrey

On Mon, 6 Mar 2006 14:57:11 -0800 (PST)
"Eric H. Jung" <grimholtz at yahoo.com> wrote:

> No,   this.label = this.checked ? 'enabled' : 'disabled';
> 
> this.label==this.checked does't make sense.
> 
> 
> --- Didier Ernotte <didier at ernotte.com> wrote:
> 
> > this.label==this.checked?
> > 
> > Didier
> > 
> > --- "Eric H. Jung" <eric.jung at yahoo.com> wrote:
> > 
> > > Hi,
> > > 
> > > I have a button checkbox defined like this:
> > > 
> > > <button id="enabledBtn" type="checkbox" label="disabled"
> > > checked="false" accesskey="E" 
> > >  
> > >
> > oncommand="this.label=this.checked?'enabled':'disabled';foxyproxy.setEnabled
> > (this.checked);"/>
> > > 
> > > and CSS like this:
> > > 
> > > button[checked="true"] {
> > >   color: red;
> > >   font-weight: bold;
> > > }
> > > 
> > > Two strange things are happening:
> > > 1. The CSS has effect only the opposite of what I defined; i.e.,
> > > when checked=false and
> > > label="disabled".
> > > 2. Although the button checkbox is initially set to false, the
> > > text is not red/bold.
> > > 
> > > Anyone know what I might be doing wrong?
> > > 
> > > Thanks,
> > > Eric Jung
> > > _______________________________________________
> > > Project_owners mailing list
> > > Project_owners at mozdev.org
> > > http://mozdev.org/mailman/listinfo/project_owners
> > > 
> > 
> > _______________________________________________
> > Project_owners mailing list
> > Project_owners at mozdev.org
> > http://mozdev.org/mailman/listinfo/project_owners
> > 
> 
> _______________________________________________
> Project_owners mailing list
> Project_owners at mozdev.org
> http://mozdev.org/mailman/listinfo/project_owners
> 


More information about the Project_owners mailing list