473,395 Members | 1,987 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

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 5856
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Mr B | last post by:
Howdy, I want to set up an Include page in a cell of a table. Then I want to be able to change which page is included on the fly as the user moves the mouse of the various links on the page. ...
3
by: bigoxygen | last post by:
Hi. I have a list that is similar to this: -Evaluation +test +test -Students +test I would like to change the "-" bullet only, but I cannot. My
16
by: Giggle Girl | last post by:
Hi there, I have a nav tree similar to the XP Windows Explorer in behavior. It uses styles to underline a row on mouseover, and change the look of a row when clicked. Currently, it is working...
1
by: roN | last post by:
Hi, I have a table in which I would like to change the background image onMouseOver. I implemented it with CSS but IE doesn't support hovers on tables, so I'd need to go via JS for IE. Can...
3
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - I have window.status="Moomin"; why doesn't the statusbar change?...
1
by: max | last post by:
hello (is this a css or a javascript question? or both?) when hovering, I can change the background (bg) color of a field (div), e.g. http://www.bep-zuerich.ch/hover4.htm with javascript I...
1
by: sueian | last post by:
can some1 help with this code. can i add in a function like on click. when user click one of the link. the color will change to static from mouse over color. the text need to highligted after click....
3
by: rlueneberg | last post by:
I want to change the color of an "a" child element inside a table cell via javascript. Is there any way to do that? Ps: there is no id assigned to child elements. I would like to discover the child...
10
oll3i
by: oll3i | last post by:
i wrote css class for a href but when i add this class to link it doesnt see the image but when i add the inline css it sees it i m writing javascript tab menu and i want tabs to change on mouse...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.