Image Ready Rollovers

Discussion in 'Javascript' started by Magic-chef, Jun 28, 2003.

  1. Magic-chef

    Magic-chef Guest

    This rollover script is created by Image Reaady. When using IE and
    especially with Win XP the images involved in the rollover disappear.
    It happens gradually with one or two at first then all. Even a browser
    refresh does not bring the images back.

    I there a problem known issue with Image Ready rollover scripts and IE+XP?

    <script TYPE="text/javascript">
    <!--
    function newImage(arg) {
    if (document.images) {
    rslt = new Image();
    rslt.src = arg;
    return rslt;
    }
    }

    function changeImages() {
    if (document.images && (preloadFlag == true)) {
    for (var i=0; i<changeImages.arguments.length; i+=2) {
    document[changeImages.arguments].src = changeImages.arguments[i+1];
    }
    }
    }

    var preloadFlag = false;
    function preloadImages() {
    if (document.images) {
    login_over = newImage("images/login-over.jpg");
    join_over = newImage("images/join-over.jpg");

    Snip out several image preloads

    preloadFlag = true;
    }
    }

    // -->
    </SCRIPT>
    Magic-chef, Jun 28, 2003
    #1
    1. Advertising

  2. Magic-chef

    Evertjan. Guest

    Magic-chef wrote on 28 jun 2003 in comp.lang.javascript:
    > I there a problem known issue with Image Ready rollover scripts and
    > IE+XP?


    No, not to me.

    Why not keep it simple:

    <img src="img1.jpg"
    onmouseover="this.save=this.src;this.src='img1a.jpg'"
    onmouseout="this.src=this.save">
    <img src="img1a.jpg" width=0 alt="preloader">
    <br>
    <img src="img2.jpg"
    onmouseover="this.save=this.src;this.src='img2a.jpg'"
    onmouseout="this.src=this.save">
    <img src="img2a.jpg" width=0 alt="preloader">



    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)
    Evertjan., Jun 28, 2003
    #2
    1. Advertising

  3. Magic-chef

    Magic-chef Guest

    Evertjan. wrote:
    > Magic-chef wrote on 28 jun 2003 in comp.lang.javascript:
    >
    >>I there a problem known issue with Image Ready rollover scripts and
    >>IE+XP?

    >
    >
    > No, not to me.
    >
    > Why not keep it simple:
    >
    > <img src="img1.jpg"
    > onmouseover="this.save=this.src;this.src='img1a.jpg'"
    > onmouseout="this.src=this.save">
    > <img src="img1a.jpg" width=0 alt="preloader">
    > <br>
    > <img src="img2.jpg"
    > onmouseover="this.save=this.src;this.src='img2a.jpg'"
    > onmouseout="this.src=this.save">
    > <img src="img2a.jpg" width=0 alt="preloader">
    >
    >
    >


    So, I would use the preload function just as it is and scrap the
    newimage function. The new image is replaced by onmouse*= in the image
    tags.

    Please excuse me as I am just starting to learn Javascript.
    Magic-chef, Jun 28, 2003
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Les Caudle
    Replies:
    0
    Views:
    309
    Les Caudle
    Apr 10, 2004
  2. Nathan Sokalski

    Image Rollovers with the Hyperlink Control

    Nathan Sokalski, Feb 18, 2006, in forum: ASP .Net
    Replies:
    8
    Views:
    8,797
    Patrick.O.Ige
    Feb 19, 2006
  3. Shahid Juma

    Rollovers over a hotspot image

    Shahid Juma, May 12, 2004, in forum: HTML
    Replies:
    0
    Views:
    516
    Shahid Juma
    May 12, 2004
  4. Jeanne D

    Image swapping/Rollovers

    Jeanne D, Oct 23, 2005, in forum: HTML
    Replies:
    6
    Views:
    456
    dorayme
    Oct 25, 2005
  5. RS
    Replies:
    2
    Views:
    513
    Neredbojias
    Jan 18, 2008
Loading...

Share This Page