SitePoint Sponsor

User Tag List

Results 1 to 7 of 7

Thread: just preload

  1. #1
    SitePoint Addict AHMED's Avatar
    Join Date
    Oct 2002
    Location
    Egypt
    Posts
    399
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Unhappy just preload

    hi all
    how r u
    who can tell me about some function which just preload some little poor images 4 me ??????????

  2. #2
    :) Have a nice day! james34's Avatar
    Join Date
    Jun 2000
    Location
    KY, USA
    Posts
    137
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    james34
    My Site

  3. #3
    SitePoint Addict AHMED's Avatar
    Join Date
    Oct 2002
    Location
    Egypt
    Posts
    399
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanx alot

  4. #4
    :) Have a nice day! james34's Avatar
    Join Date
    Jun 2000
    Location
    KY, USA
    Posts
    137
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I hope it answers your question.
    james34
    My Site

  5. #5
    SitePoint Addict AHMED's Avatar
    Join Date
    Oct 2002
    Location
    Egypt
    Posts
    399
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    so can this do what i need ?
    Code:
    <SCRIPT LANGUAGE="JavaScript">
    var myImagesOff = new Array("menu1_1.gif", "menu1_2.gif", "menu1_3.gif");
    var myImagesOn = new Array("menu2_1.gif", "menu2_2.gif","menu2_3.gif","menu2_4.gif","menu2_5.gif","menu2_6.gif");
    
    var directoryPath = "images/gifs/"	
    
    function preloadImages()
    {
    	for(var loop = 0; loop < myImagesOn.length; loop++)
    	{
    		var anImage = new Image();
    		anImage.src = myImagesOn[loop];
    	}
    }
    
    </SCRIPT>

  6. #6
    :) Have a nice day! james34's Avatar
    Join Date
    Jun 2000
    Location
    KY, USA
    Posts
    137
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Have you tried the above javascript? I am not sure if it would work or not. I thought you needed a simple preload script. I have only just started learning javascript.

    Matybe someone with a little more experience can answer your question Sorry all I knew about it is how to do a simple image preload.
    james34
    My Site

  7. #7
    SitePoint Addict AHMED's Avatar
    Join Date
    Oct 2002
    Location
    Egypt
    Posts
    399
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Thumbs up it's it

    i exactly wanted asimple script but i found this so i wanted 2 ask about it


Bookmarks

Posting Permissions

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