Need help with hyperlink mouseover

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
 
V

vMike

Just a thought but you might look into hover. You could put that in a style
sheet for sure.
 
W

wazoo

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top