Need javascript/firefox help! Any coders online who can look at my code?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jawanda
    Confirmed User
    • Feb 2003
    • 6040

    #1

    Need javascript/firefox help! Any coders online who can look at my code?

    On this page I have a table with an ID of "picTable".

    I have this javascript code that I am using in order to change the background of the table when a button is moused-over:

    <script type="text/javascript">
    function t(s){
    document.getElementById('picTable').background = s;
    //document.getElementById('picTable').refresh;
    }
    </script>

    and for the button ...

    <a href="#" onMouseOver="t('/hardware_graphics/pic1.jpg');" onMouseOut="t('/hardware_graphics/image_placeholder.jpg',0);" />

    Works perfectly in IE, but not in Firefox. I have used the same script to change other elements and it has worked in FF, but not with the table background image. Also, the refresh tag is in there because I tried it and it didn't make a difference.

    Thanks a lot for any ideas!
  • borked
    Totally Borked
    • Feb 2005
    • 6284

    #2
    what (true/false) do you want the function to return and when?

    For coding work - hit me up on andy // borkedcoder // com
    (consider figuring out the email as test #1)



    All models are wrong, but some are useful. George E.P. Box. p202

    Comment

    • borked
      Totally Borked
      • Feb 2005
      • 6284

      #3
      also,

      <a href="#" onMouseOver="t('/hardware_graphics/pic1.jpg');" onMouseOut="t('/hardware_graphics/image_placeholder.jpg',0);" />

      why the closing tag on the <a> link? eg <a href..... />
      Is there no link? If not, why the <a> tag?

      For coding work - hit me up on andy // borkedcoder // com
      (consider figuring out the email as test #1)



      All models are wrong, but some are useful. George E.P. Box. p202

      Comment

      • jawanda
        Confirmed User
        • Feb 2003
        • 6040

        #4
        Ahh nevermind, made it work by using a regular image to replace rather than table bg image. Not ideal because i have to do some cropping but it will work.

        Comment

        Working...