Wrox Home  
Search P2P Archive for: Go

  Return to Index  

javascript thread: eventhandler for input tag of type text - change style


Message #1 by "Inge Larsson" <inge.larsson@f...> on Tue, 9 Jan 2001 19:02:31 -0000
Thanks John, this makes me able to continue my project!
Inge

John Lemp  (2001-01-09  21:52):
>you can add onfocus=3D"this.style.background-color=3D'white'" and
>onblur=3D"this.style.background-color=3D'yellow'"
>
>John
>
>-----Original Message-----
>From: Inge Larsson [mailto:inge.larsson@f...]
>Sent: Tuesday, January 09, 2001 2:03 PM
>To: javascript
>Subject: [javascript] eventhandler for input tag of type text - change
>style
>
>
>Hi,
>
>I have this input tag like this:
>
><input type=3D"text" onChange=3D"change=5Falert('Message')" size=3D"15"
>maxlength=3D"12" style=3D"background-color:yellow;" name=3D"Name" value=3D
"Value">
>
>I want to add an eventhandler for the Click event that changes
>the background color for the text box to white, and an eventhandler
>for the Blur event that changes the background color (back) to
>yellow. Unfortunately, I don't make this work.
>
>Anyone who have any suggestion how to implement this=3F
>Would be very grateful.
>
>Regards
>Inge Larsson
>
>
--------------------------------------------
Inge Larsson
F=D6RS=C4KRINGKASSAN V=C4STRA G=D6TALAND
IT-avdelningen
Bohusgatan 13
405 12  G=D6TEBORG
Tfn fast:  031-700 51 05
Tfn mobil: 070-300 15 32
Tfn fax:   031-700 51 59
E-mail: inge.larsson@f...
--------------------------------------------

  Return to Index