Change ForeColor of asp.net text box

  • Thread starter Thread starter Jim
  • Start date Start date
J

Jim

Hey all, I'm trying to change the forecolor of asp.net textbox text as
I mouse over them. I keep getting a javascript error that the item
doesn't exist when trying to reference it by it's ID. Any help would
be appreciated.
 
Give something like this a shot:

[in asp]

<asp:textbox ... onmouseout = "changecolor(this, 'black');" onmouseover =
"changecolor(this, 'red');" ... />

[in js]

changecolor(something, somecolor)
{
something.style.color = somecolor;
}
 
Back
Top