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 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Apr 2006
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    JS Rollover Problem (works in IE, not in FF) [SOLVED]

    Hi,
    I'm working with a friend on a rather large project. He's doing the graphical work and I'm doing the coding, and I've reached a problem with a rather small JavaScript snippet I wrote. The purpose is going to be (eventually) that the user can hover their mouse over any of four big images on the homepage and text will be displayed on the image, then that text will disappear when the user's mouse leaves the image. Half of the battle is done as far as I'm concerned. My code works just how I want it to in IE7.. but upon viewing the same page in FireFox 2.0, the JavaScript has no effect.

    Here is the page with the problem: http://healthropes.snsoftware.net/files/alpha/index.htm.

    All of the JavaScript is located in that index page. I am rather new to JavaScript and I used a few tutorials to help me set up what I have now. Basically, all I need to happen at the moment is for the page linked to above to work in FireFox exactly as it does in Internet Explorer.

    Any help with this problem would be GREATLY appreciated!

    Thanks,
    --Sean

    EDIT: PROBLEM SOLVED - Thanks, TripperTreats
    Last edited by Cynical; 01-13-2007 at 05:35 PM. Reason: Problem solved

  • #2
    New Coder TripperTreats's Avatar
    Join Date
    Oct 2006
    Posts
    92
    Thanks
    0
    Thanked 0 Times in 0 Posts
    change document.all to document.getElementById
    Psychedelic digital art at www.trippertreats.com.

    "And in the end, the love you take
    is equal to the love you make
    ."

  • #3
    New Coder TripperTreats's Avatar
    Join Date
    Oct 2006
    Posts
    92
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I meant to show the new function:

    Code:
    function ro_show(div) {
      var obj = document.getElementById('rollover_'+div);
      obj.innerHTML = hovertext[div];
    }
    Psychedelic digital art at www.trippertreats.com.

    "And in the end, the love you take
    is equal to the love you make
    ."

  • #4
    New to the CF scene
    Join Date
    Apr 2006
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Wow, thanks! I *knew* it had to be something like that .. something I'd never detect :P. Thank you very much, after making the same adjustment to the other function, things are working perfectly!

    Thanks again,
    --Sean


  •  

    Posting Permissions

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