Results 1 to 2 of 2

Thread: Background Rollover

  1. #1

    Thread Starter
    Hyperactive Member Wak's Avatar
    Join Date
    Nov 2000
    Location
    Brisbane, Queensland
    Posts
    298

    Unhappy

    Hi,
    I want to make an image rollover using Javascript, and I have the images. The only thing is it is a rollover for a table's td background property. He is what I have so far.

    <html>
    <head>
    <SCRIPT LANGUAGE=JAVASCRIPT>
    <!--
    var imgButton0 = new Image();
    var imgButton1 = new Image();

    imgButton0 = "images\side.jpg"
    imgButton1 = "images\11.jpg"

    }
    function Swap(num) {
    if ((num == "0")) {document.imgButton.background = imgButton0;}
    if ((num == "1")) {document.imgButton.background = imgButton1;}
    return true;
    }
    -->
    </SCRIPT>
    </head>
    <body>
    <table>
    <tr><a OnMouseOver="Swap(0)" OnMouseOut="Swap(1)">
    <td background="images\side.jpg" name="Button"></a>
    </tr>
    </table>
    </body>
    </html>

    I don't know where I am going wrong.
    Visual Basic 6.0 Enterprise
    Visual C++ 6.0 Professional

    Wak

  2. #2
    Frenzied Member sebs's Avatar
    Join Date
    Sep 2000
    Location
    Aylmer,Qc
    Posts
    1,606
    well first of all, you don't close your td
    and u should put your <a> in your <td>, cuz in
    netscape it will not work.

    and put <a href="#">

    try this and let me know!!

Posting Permissions

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



Click Here to Expand Forum to Full Width