Change class with onmouseover

G

Guest

Hi,

I'm looking to change the cssclass on a hyperlink with the onmouseover. I've
tried the 3 syntax's below but to no success. Can someone point me in the
right direction.
Thanks

HyperLink1.Attributes.Add("onmouseover", "this.ClassName='hover'")
HyperLink1.Attributes.Add("onmouseover", "this.CssClass='hover'")
HyperLink1.Attributes.Add("onmouseover", "this.Class='hover'")

Stylesheet says this.

..hover
{
text-decoration: underline overline blink none;
color: green;
cursor: wait;
}
 
J

Jan Kucera

Oh yes, javascript is case sensitive and uses another casing.

Try this.className = 'hover'.

Hope this helps. ;-)
Jan.
 
G

Guest

That works, thank you.

is there a site that shows how the case should be for each item? I seem to
run into that a lot.

Thanks
 

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,777
Messages
2,569,604
Members
45,228
Latest member
MikeMichal

Latest Threads

Top