473,388 Members | 1,326 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,388 software developers and data experts.

Need help with hyperlink mouseover

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

Nov 17 '05 #1
2 1789
Just a thought but you might look into hover. You could put that in a style
sheet for sure.

"wazoo" <wa***@NOSPAMnycap.rr.com> wrote in message
news:eh****************@twister.nyroc.rr.com...
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

Nov 17 '05 #2

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.
"vMike" <Mi************@nospam.gewarren.com.delete> wrote in message
news:bn**********@ngspool-d02.news.aol.com...
Just a thought but you might look into hover. You could put that in a style sheet for sure.

"wazoo" <wa***@NOSPAMnycap.rr.com> wrote in message
news:eh****************@twister.nyroc.rr.com...
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


Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: addi | last post by:
All, I have seen the feature on many sites and would like to implement it for myself as well, where if a mouse is moved over a hyperlink, it gets underlined. For example, in my code, if the...
2
by: Peter Eriksson | last post by:
I am making a link with the HyperLink-class like this: HyperLink link = new HyperLink(); link.NavigateUrl = "http://www.page.com"; link.Text = "Some text";...
3
by: wazoo | last post by:
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:...
0
by: Whitney Yiu | last post by:
I am using a DataGrid, and have bound it to some data (not using the quick design way though -- i hard coded it using sql data adapter, command, etc). Anyways, I have a column that is a link, and i...
1
by: Peter Morris | last post by:
Newbie q. how do I change the image url for a hyperlink on mouseover? I have a menubar, and I want to highlight the selected item.
5
by: Dave | last post by:
I've been given a flash banner and told to make it a hyperlink. I tried this: <script type="text/javascript"> Document.getElementById("flashcontent").onclick = function(){...
0
by: cps_farzin | last post by:
I am using ASP.Net and C# in development of my webapp. I want to user hyperlink <a href=...as link but when I do, I loose the finger pointer on mouse over. How do I get that back? Any ideas?!...
4
by: Mat | last post by:
How do you modify the color of an hyperlink when your mouse go over it? <asp:HyperLink
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
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.