Discover Habbo's history
Treat yourself with a Secret Santa gift.... of a random Wiki page for you to start exploring Habbo's history!
Happy holidays!
Celebrate with us at Habbox on the hotel, on our Forum and right here!
Join Habbox!
One of us! One of us! Click here to see the roles you could take as part of the Habbox community!


Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2007
    Location
    London
    Posts
    1,577
    Tokens
    36

    Latest Awards:

    Default Javascript Help: MM_preloadImages

    Hi,

    I'm using the following code to preload images onload of the page:

    Code:
    <body onLoad="MM_preloadImages('image1.png','image2.png','etc.png')">
    The code does exactly as expected in IE, but in firefox it simply doesn't seem to preload the images as it should?

    Am I doing something wrong, or is there an alternative that will work in firefox?

    Thanks very much.
    Kind Regards,

    Guy
    __________________

    Since 2007. Unbelievable Uptime. Web hosting, resellers, master resellers, linux VPS, windows VPS, shoutcasts, at the lowest prices on the net.
    Tech-Hosts.co.uk.


  2. #2
    Join Date
    Jan 2006
    Location
    Kent
    Posts
    987
    Tokens
    0

    Default

    Try using this, it looks quite good
    http://net.tutsplus.com/freebies/plu...reload-images/
    This is our situation and we're happy to be here,
    I wouldn't change this place for anything.


  3. #3
    Join Date
    Nov 2007
    Location
    London
    Posts
    1,577
    Tokens
    36

    Latest Awards:

    Default

    Quote Originally Posted by Joe! View Post
    Try using this, it looks quite good
    http://net.tutsplus.com/freebies/plu...reload-images/
    Is there not a simple preload technique or script that doesn't require me to install jquery and that script?

    Edit:

    Would this work:

    Code:
    function MM_preloadImages() { //v3.0
      var d=document;
       if(d.images){
       if(!d.MM_p) d.MM_p=new Array();
       var i,j=d.MM_p.length,a=MM_preloadImages.arguments;
        for(i=0; i<a.length; i++)
        if (a[i].indexOf("#")!=0){
           d.MM_p[j]=new Image;
           d.MM_p[j++].src=a[i];
           }
        }
    }
    Last edited by iUnknown; 16-07-2009 at 04:47 PM.
    Kind Regards,

    Guy
    __________________

    Since 2007. Unbelievable Uptime. Web hosting, resellers, master resellers, linux VPS, windows VPS, shoutcasts, at the lowest prices on the net.
    Tech-Hosts.co.uk.


Posting Permissions

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