It works when I don't use for example a button to update text of text box

what if I have several buttons that also update that text box too

On Thu, Feb 14, 2008 at 11:17 PM, Eric H. Jung <[EMAIL PROTECTED]> wrote:

> As Neil suggests, you could do:
>
> <textbox id="tb" onkeypress="styleInput(this);"/>
>
> <script>
> function styleInput(tb) {
>  tb.setStyle(tb.value == "special input" ?
>    "font-weight: bold;" : "font-weight: normal; font-style: italic;");
>  // you could also use tb.setStyle() or tb.className = myClass
>
> }
> </script>
> --- Ondrej Donek <[EMAIL PROTECTED]> wrote:
>
>
> ---------------------------------
>   The best (as I think) is to use XBL - I did oncetime something
> similiar(but highlighted words
> were loaded from sqlite database) but I haven'tthat code here so I
> couldn't post it :( - I'll try
> to send it tommorrow.
>
> Neil wrote:
> joe ertaba wrote:
>
> I want to have a textbox which when some especial text typed in it become
> bold otherwise be
> italic;non-bold
>
> You could use some script to change the style of the textbox depending on
> the text typed into
> it._______________________________________________Project_owners mailing
> [EMAIL PROTECTED]
> .orghttps://www.mozdev.org/mailman/listinfo/project_owners
>
> > _______________________________________________
> > Project_owners mailing list
> > [email protected]
> > https://www.mozdev.org/mailman/listinfo/project_owners
> >
>
>
>
>
>  
> ____________________________________________________________________________________
> Be a better friend, newshound, and
> know-it-all with Yahoo! Mobile.  Try it now.
> http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
>
> _______________________________________________
> Project_owners mailing list
> [email protected]
> https://www.mozdev.org/mailman/listinfo/project_owners
>
_______________________________________________
Project_owners mailing list
[email protected]
https://www.mozdev.org/mailman/listinfo/project_owners

Reply via email to