473,587 Members | 2,588 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Hyperlink Mouseover not working

Any idea why this code would not fire?
btnMakePmt.Attr ibutes.Add("onM ouseOver",
"this.src='img\ \MakePmt_nav2_o ver.jpg'")
btnMakePmt.Attr ibutes.Add("onM ouseOut",
"this.src='img\ \MakePmt_nav2.j pg'")

I have two other Image buttons that this code works fine with. The
btnMakePmt is an asp.net hyperlink control. I need this to remain a
hyperlink so I can use the Target attribute to display it in a new
window instead of the current browser window (like an image button
would do with response.redire ct).

I do not receive any errors when the page loads. When I mouse over the
control it just does nothing.
Thanks

Feb 14 '06 #1
1 2053
I suggest you put the rollover functionality into a control so it is
guaranteed that the HTML/JavaScript generated is the same for each button.
Actually, I've already done the work for you. You can download the
ImageRolloverBu tton here:
http://SteveOrr.net/articles/InheritAndExtend.aspx

--
I hope this helps,
Steve C. Orr
MCSD, MVP
http://Steve.Orr.net

"mj****@firstin surancefunding. com" wrote:
Any idea why this code would not fire?
btnMakePmt.Attr ibutes.Add("onM ouseOver",
"this.src='img\ \MakePmt_nav2_o ver.jpg'")
btnMakePmt.Attr ibutes.Add("onM ouseOut",
"this.src='img\ \MakePmt_nav2.j pg'")

I have two other Image buttons that this code works fine with. The
btnMakePmt is an asp.net hyperlink control. I need this to remain a
hyperlink so I can use the Target attribute to display it in a new
window instead of the current browser window (like an image button
would do with response.redire ct).

I do not receive any errors when the page loads. When I mouse over the
control it just does nothing.
Thanks

Feb 14 '06 #2

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

Similar topics

3
6025
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 mouse is moved over "home" or gets the focus, I would like it to be underlined. <html> <body> <font face="Arial, Helvetica, sans-serif" size="1"...
2
2618
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"; link.ImageUrl="/images/linkimage.gif"; What I would like to do is to show another image for the link on the mouseover event.
2
1803
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: Button1.Attributes.Add("onmouseover", "this.style.backgroundColor=""Blue""") Button1.Attributes.Add("onmouseout", "this.style.backgroundColor=""Navy""") And...
1
1646
by: vishal | last post by:
I am using a datagrid where there is a hyperlink column. On mouseover I get the whole link in the status bar which I want to put some static message or mask it. How do I achive this in .net? If any one knows the script or any other method just let me know that with some sample code. regards vishal.
8
3785
by: Nathan Sokalski | last post by:
I have several System.Web.UI.WebControls.HyperLink Controls which I want to display as rollover images. I know how to make these manually using the <a> and <img> tags or the <a> tag and a System.Web.UI.WebControls.Image Control or a HyperLink and Image Controls, but the onMouseOver and onMouseOut attributes must be in the <img> tag. If I were...
1
1544
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
5524
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(){ window.location='http://www.website.com'; } </script> but received an error stating that "Document" was undefined. I also tried this:
4
8140
by: Mat | last post by:
How do you modify the color of an hyperlink when your mouse go over it? <asp:HyperLink
16
5588
by: FreeSlagg | last post by:
Hi guys! I'm working in PHPBB 3.0.2 and I'd like to create a BB Code that gives one thumbnail image on mouseover and the larger version in a popup window like Lightbox 2, Ajax, or the likes. It's a linux server. Thanks for the help! -Free
0
7843
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8206
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8340
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
6621
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5392
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3840
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3875
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2353
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
1185
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.