Need help with hyperlink mouseover

  • Thread starter Thread starter wazoo
  • Start date Start date
W

wazoo

I'm hoping someone here might help me with this.

I'm putting the finishing touches on my intranet web app, and I'm adding
some simple JavaScript to my VB.Net Webforms.

This works:
Button1.Attributes.Add("onmouseover", "this.style.backgroundColor=""Blue""")
Button1.Attributes.Add("onmouseout", "this.style.backgroundColor=""Navy""")

And this works:
Hyperlink1.Attributes.Add("onmouseover", "this.style.fontWeight=""Bold""")
Hyperlink1.Attributes.Add("onmouseout", "this.style.fontWeight=""Normal""")

But this doesn't:
Hyperlink2.Attributes.Add("onmouseover", "this.style.COLOR=""Blue""")
Hyperlink2.Attributes.Add("onmouseout", "this.style.COLOR=""Navy""")

I'd like the hyperlink text to sort of "glow" by changing the font to the
lighter color, but it does nothing. I've hacked at it for an hour or so and
tried .color, .forecolor, .foreground, .foregroundcolor, .fontcolor, and so
on. . . I googled for example code and found plenty, but none just changing
the font color.

So either this simply can't be done this way, or I need a clue.

TIA
 
Just a thought but you might look into hover. You could put that in a style
sheet for sure.
 
Actually "COLOR" was typed for emphasis, I was typing "Color" - still
incorrect, and for the same reason: JScript is case-sensitive

"color" works. CSS will need to wait for the next project, I need to get
this one off my desk.
 
Back
Top