Web Analytics Made Easy -
StatCounter Image Swapping and FireFox? - CodingForum

Announcement

Collapse
No announcement yet.

Image Swapping and FireFox?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Image Swapping and FireFox?

    Hello,
    I've put together a little function for mouse over image swapping.

    PHP Code:
    function SwapImage(strNamge,strImage){
        
    ImageFlip= new Image()
        
    ImageFlip.src strImage;
        var 
    strImageOn document.getElementById(strNamge);
        
    strImageOn.src ImageFlip.src; return true;

    this works great in IE, but not at all in firefox.
    was hoping that someone here might have an idea how to fix this?

    thanks in advance for your time!
    -Ken

  • #2
    Nothing obvious wrong with your function-
    How are you calling the function and passing the values?

    If an event handler works in one browser and not another,
    it is usually the case that the other browser isn't listening for the event,
    or isn't hearing the arguments.

    Comment


    • #3
      I'm using onMouseOver and OnMouseOut to call the function, and I'm just passing it the image file name and the image id/name.

      Comment


      • #4
        Post your html please. You might be confusing what a name and id actually are.
        ||||If you are getting paid to do a job, don't ask for help on it!||||

        Comment

        Working...
        X