Link to home
Start Free TrialLog in
Avatar of nsyyoung
nsyyoungFlag for United States of America

asked on

How can I make the text of a label change when I mouse over a certain hyperlink?

I have several hyperlinks, all with the same imageURL.  When I hover over one, it's imageURL should change to another image; this I can do in CSS.  However, I also want the text of a label to change based on the hyperlink that's being hovered, with the other hyperlinks remaining the same.  Essentially, I want to do what's on the bottom of the http://paragonaz.com site, but not in Flash.

Any and all suggestions will be appreciated; I'd prefer a solution that involves a mouseOver event handler in the code-behind page.  I'm using Visual Studio 2008.  VB.

Thanks in advance.
Avatar of Joel Coehoorn
Joel Coehoorn
Flag of United States of America image

You'll want to do this in javascript rather than server events.   Why don't you post the relevant portions of the rendered html and we'll help you craft the appropriate javascript.
Avatar of nsyyoung

ASKER

Of course.  It's pretty basic stuff.  The master page contains nothing but default initial code.
Page code (partial)
 <table align="center" cellpadding="0" cellspacing="0" class="style1">
            <tr>
                <td align="center" colspan="14">
                    <asp:ImageButton ID="ImageButton1" runat="server" CssClass="rollOverImageLink" 
                        ImageUrl="~/images/designImages/one.gif" />
                </td>
                                        </tr>
            <tr>
                <td align="center" colspan="14">
                    <asp:Label ID="lblProject" runat="server" meta:resourcekey="Label1Resource1">Click 
                    a triangle below to view individual projects</asp:Label>
                </td>
                                        </tr>
<!--row with 13 other similar links ommitted-->
</table>
 
CSS:
.rollOverImageLink
{
    background-image: url(/images/designImages/one.gif);
    background-repeat: no-repeat;
    border-style: none;
}
.rollOverImageLink:hover
{  background-image: url(/images/designImages/three.gif);
  background-repeat: no-repeat;
  border-style:none;   
        }

Open in new window

Sorry to take so long getting back to you.  I haven't been checking EE for a few days: my wife had a baby Friday morning!  You may want to petition a mod to close the question and re-open a new one with identical information, as it's likely to be a few more days before I spend any time on EE.
Congratulations!  You should definitely be with her. Respond when you can; I'm a mom -- I understand.

Thanks for the update!
ASKER CERTIFIED SOLUTION
Avatar of nsyyoung
nsyyoung
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial