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
    Super Moderator
    Join Date
    May 2002
    Location
    Perth Australia
    Posts
    4,073
    Thanks
    11
    Thanked 98 Times in 96 Posts

    change td background image on mouseover?

    hi, how can I change the background image of a table cell on mouseover ?

    <td width="180" height="22" background="./img/menu.jpg" align="right" id="menu1">
    <a href="./link" class="menu_left" onmouseover="swap(this,'menu1')" onmouseout="swap(this,'menu1')">link</a>
    </td>

    currently swap just does ...

    function swap(obj,td){
    var col=obj.style.color;
    if(col!="red"){
    obj.style.color="red";
    }else{
    obj.style.color="696969";
    }
    }

    I tried all sorts of things to get at the td background image but cant seem to ?

    any help much appreciated

    PS , just as happy to use a div or span ?
    Last edited by firepages; 06-07-2003 at 06:30 AM.
    resistance is...

    MVC is the current buzz in web application architectures. It comes from event-driven desktop application design and doesn't fit into web application design very well. But luckily nobody really knows what MVC means, so we can call our presentation layer separation mechanism MVC and move on. (Rasmus Lerdorf)

  • #2
    Regular Coder
    Join Date
    Feb 2003
    Location
    Helsinki, Finland
    Posts
    111
    Thanks
    0
    Thanked 0 Times in 0 Posts

    There's probably an easier way...

    "How can I set the background image of a table cell"
    http://www.faqts.com/knowledge_base/...d/4005/fid/192

    This looks pretty good. It may not answer directly to your question, but it should help you.


  •  

    Posting Permissions

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