Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Jun 2002
    Location
    Canada
    Posts
    53
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Changing Table Background w/ links

    Hullo,

    Just looking for a simple script, I want to have 4 links that, when clicked, will change the back ground image of a table. Simple enough... but I don't know how. :P

    Thanks.
    Tombo out.

  • #2
    New Coder
    Join Date
    Jun 2002
    Location
    dJogja id
    Posts
    12
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Try this,
    -----the script
    <script>
    function chgArrow(i){
    document.getElementById('tdImg').setAttribute("background",i);
    }
    </script>
    -----the table
    <table>
    <tr>
    <td><a href="javascript:chgArrow('images/image1.gif')">up</a></td>
    <td><a href="javascript:chgArrow('images/image2.gif')">Down</a></td>
    <td id="tdImg" background="images/default.gif" nowrap>----content here------</td>
    </tr>
    </table>

    script run for DOM browser only, i try with IE6 and NN6


  •  

    Posting Permissions

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