Results 1 to 2 of 2

Thread: Add hyperlink to onMouseOver command

  1. #1
    Join Date
    Aug 2009
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Add hyperlink to onMouseOver command

    I want to be able to convert the image to a hyperlink in the below code so the image can be moused over then clicked to link to another page on my site:

    HTML Code:
    <td onMouseOver="document.getElementById('hide1').style.display='none';document.getElementById('show1').style.display='inline';" onMouseOut="document.getElementById('show1').style.display='none';document.getElementById('hide1').style.display='inline';">
    			<img src="images/smiths1_04.gif" width="117" height="50" alt="" id="hide1"><img src="images/smiths_04.gif" id="show1" style="display:none" /></td>
    Thanks in advance.

  2. #2
    Join Date
    Jul 2009
    Location
    Binus University
    Posts
    472
    Thanks
    78
    Thanked 21 Times in 21 Posts

    Default

    Code:
    <a href="#" onMouseOver="document.getElementById('hide1').style.display='none';document.getElementById('show1').style.display='inline';" onMouseOut="document.getElementById('show1').style.display='none';document.getElementById('hide1').style.display='inline';">
    			<img src="images/smiths1_04.gif" width="117" height="50" alt="" id="hide1"><img src="images/smiths_04.gif" id="show1" style="display:none" /></a>
    you can change your code like i write up there, change the symbol # with your link, and that it your mouseOver command combine with the hyperlink.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •