469,612 Members | 2,576 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,612 developers. It's quick & easy.

Change class with onmouseover

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;
}
May 7 '06 #1
3 5683
Oh yes, javascript is case sensitive and uses another casing.

Try this.className = 'hover'.

Hope this helps. ;-)
Jan.
"Vear" <Ve**@discussions.microsoft.com> wrote in message
news:83**********************************@microsof t.com...
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;
}

May 7 '06 #2
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

"Jan Kucera" wrote:
Oh yes, javascript is case sensitive and uses another casing.

Try this.className = 'hover'.

Hope this helps. ;-)
Jan.
"Vear" <Ve**@discussions.microsoft.com> wrote in message
news:83**********************************@microsof t.com...
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;
}


May 7 '06 #3
Most of built-in javascript properties are lowerCamelCase, that means first
letter is lowercasae and every other starting word is uppercase.

I would start at
http://msdn.microsoft.com/workshop/a...ence_entry.asp

Good luck,
Jan.
"Vear" <Ve**@discussions.microsoft.com> wrote in message
news:B4**********************************@microsof t.com...
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

"Jan Kucera" wrote:
Oh yes, javascript is case sensitive and uses another casing.

Try this.className = 'hover'.

Hope this helps. ;-)
Jan.
"Vear" <Ve**@discussions.microsoft.com> wrote in message
news:83**********************************@microsof t.com...
> 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;
> }


May 7 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by bigoxygen | last post: by
16 posts views Thread by Giggle Girl | last post: by
1 post views Thread by roN | last post: by
1 post views Thread by max | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.