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

    can anyone fix my image preloading code?

    can a moderator move this thread to the javascript board?

    hey, i think my image preloading code is not working. does anyone see any errors?



    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title>Two Eyeballs - Relief Prints to Relieve Emptiness</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <meta name="keywords" content="two eyeballs, emily wick, artist, linocuts, prints, relief prints, linoleum, jessie wick, wickropolis, pigbug, oakland, art, jessica wick, emptiness">
    <meta name="description" content="Linocuts by Emily Wick, in association with Wickropolis.">
    <script language="JavaScript" type="text/JavaScript">
    <!--



    var preload = new array ('emsite/logos/allprintsroll.jpg', 'emsite/logos/newwork.jpg', 'emsite/logos/inforoll.jpg' , 'newindexbuttons/mesleepingroll2.jpg', 'newindexbuttons/pigbugroll2.jpg' , 'pigbugsleeping.jpg', 'newindexbuttons/twoeyeballsroll2.jpg', 'twoeyes.jpg', 'newindexbuttons/thesurrenderroll2.jpg', 'thesurrender.jpg', 'newindexbuttons/thefishermanroll.jpg', 'fisherman.jpg', 'newindexbuttons/justeyesroll.jpg', 'justeyeballs.jpg') ;
    var loader = new array ('emsite/logos/allprintsroll.jpg', 'emsite/logos/newwork.jpg', 'emsite/logos/inforoll.jpg' , 'newindexbuttons/mesleepingroll2.jpg', 'newindexbuttons/pigbugroll2.jpg' , 'pigbugsleeping.jpg', 'newindexbuttons/twoeyeballsroll2.jpg', 'twoeyes.jpg', 'newindexbuttons/thesurrenderroll2.jpg', 'thesurrender.jpg', 'newindexbuttons/thefishermanroll.jpg', 'fisherman.jpg', 'newindexbuttons/justeyesroll.jpg', 'justeyeballs.jpg') ;
    for(var i = 0; i < preload.length; i++) {
    loader[i] = new image ('emsite/logos/allprintsroll.jpg', 'emsite/logos/newwork.jpg', 'emsite/logos/inforoll.jpg' , 'newindexbuttons/mesleepingroll2.jpg', 'newindexbuttons/pigbugroll2.jpg' , 'pigbugsleeping.jpg', 'newindexbuttons/twoeyeballsroll2.jpg', 'twoeyes.jpg', 'newindexbuttons/thesurrenderroll2.jpg', 'thesurrender.jpg', 'newindexbuttons/thefishermanroll.jpg', 'fisherman.jpg', 'newindexbuttons/justeyesroll.jpg', 'justeyeballs.jpg') ;
    loader[i].src = preload[i] ;
    }
    //-->
    </script>
    <style type="text/css">
    <!--
    .border1 {
    border: 1px solid #ED1516;
    }
    -->
    </style>
    </head>
    Last edited by jessiewick; 02-23-2005 at 11:03 PM. Reason: can a moderator move this to js?

  • #2
    Senior Coder chilipie's Avatar
    Join Date
    Jul 2004
    Location
    Shrewsbury, UK Age: 16
    Posts
    1,117
    Thanks
    0
    Thanked 0 Times in 0 Posts
    As this is a JavaScript related question, it should be in the JS forums. Ask a mod to move it, do not double post.

  • #3
    Senior Coder
    Join Date
    Nov 2003
    Location
    Minneapolis, MN
    Posts
    2,879
    Thanks
    2
    Thanked 65 Times in 56 Posts
    Go get 'em Ollie

    Hey, as long as you're here in the CSS forums, why not try CSS rollovers? No messy code, cross-broser compatible, fast load times, less images...

    http://wellstyled.com/css-nopreload-rollovers.html

    Maybe it'll change your world, who knows?

    Last edited by rmedek; 02-24-2005 at 01:30 AM.


  •  

    Posting Permissions

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