943,541 Members | Top Members by Rank

Ad:
Nov 19th, 2008
0

Please help me

Expand Post »
What I am trying to do is preload images on my website and delay my javascript slide-show until the images are completely done loading. Right now the slide-show starts while the images are still loading, making it kind of awkward. I am using this to preload my images but it isn't working.

<script type="text/javascript">

Image1 = new Image(417,500)
Image1.src = "Links/SG1.jpg"

Image2 = new Image(680,500)
Image2.src = "Links/SG2.jpg"

Image3 = new Image(571,500)
Image3.src = "Links/Botany.jpg"

Image4 = new Image(361,500)
Image4.src = "Links/VT2.jpg"

Image5 = new Image(400,500)
Image5.src = "Links/AC1.jpg"

Image6 = new Image(663,500)
Image6.src = "Links/AR1.jpg"

Image7 = new Image(680,500)
Image7.src = "Links/MSU2.jpg"

Image8 = new Image(680,500)
Image8.src = "Links/3D2.jpg"

Image9 = new Image(676,500)
Image9.src = "Links/CON1.jpg"

</script>

The is the site http://www.nathancharles.net/i_0.html

If anyone could help me that would be awesome.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
silentbob671123 is offline Offline
3 posts
since Nov 2008
Nov 21st, 2008
0

Re: Please help me

What I am trying to do is preload images on my website and delay my javascript slide-show until the images are completely done loading. Right now the slide-show starts while the images are still loading, making it kind of awkward. I am using this to preload my images but it isn't working.

<script type="text/javascript">

Image1 = new Image(417,500)
Image1.src = "Links/SG1.jpg"

Image2 = new Image(680,500)
Image2.src = "Links/SG2.jpg"

Image3 = new Image(571,500)
Image3.src = "Links/Botany.jpg"

Image4 = new Image(361,500)
Image4.src = "Links/VT2.jpg"

Image5 = new Image(400,500)
Image5.src = "Links/AC1.jpg"

Image6 = new Image(663,500)
Image6.src = "Links/AR1.jpg"

Image7 = new Image(680,500)
Image7.src = "Links/MSU2.jpg"

Image8 = new Image(680,500)
Image8.src = "Links/3D2.jpg"

Image9 = new Image(676,500)
Image9.src = "Links/CON1.jpg"

</script>

The is the site http://www.nathancharles.net/i_0.html

If anyone could help me that would be awesome.


Try this:

you can check whether your page is loaded completely using this:

window.document.readyState
if(window.document.readyState=='Complete') {
//start image preloaders ....
}

Regards.
Reputation Points: 10
Solved Threads: 3
Newbie Poster
sasankasekhar is offline Offline
24 posts
since Jan 2007
Nov 21st, 2008
0

Re: Please help me

What I am trying to do is preload images on my website and delay my javascript slide-show until the images are completely done loading. Right now the slide-show starts while the images are still loading, making it kind of awkward. I am using this to preload my images but it isn't working.

<script type="text/javascript">

Image1 = new Image(417,500)
Image1.src = "Links/SG1.jpg"

Image2 = new Image(680,500)
Image2.src = "Links/SG2.jpg"

Image3 = new Image(571,500)
Image3.src = "Links/Botany.jpg"

Image4 = new Image(361,500)
Image4.src = "Links/VT2.jpg"

Image5 = new Image(400,500)
Image5.src = "Links/AC1.jpg"

Image6 = new Image(663,500)
Image6.src = "Links/AR1.jpg"

Image7 = new Image(680,500)
Image7.src = "Links/MSU2.jpg"

Image8 = new Image(680,500)
Image8.src = "Links/3D2.jpg"

Image9 = new Image(676,500)
Image9.src = "Links/CON1.jpg"

</script>

The is the site http://www.nathancharles.net/i_0.html

If anyone could help me that would be awesome.
Try This:
JavaScript / DHTML / AJAX Syntax (Toggle Plain Text)
  1. if(window.document.readyState=='complete'){
  2. // call your image slide show functions ....
  3. }

Regards ...
Reputation Points: 10
Solved Threads: 3
Newbie Poster
sasankasekhar is offline Offline
24 posts
since Jan 2007
Nov 21st, 2008
0

Re: Please help me

thanks much
Reputation Points: 10
Solved Threads: 0
Newbie Poster
silentbob671123 is offline Offline
3 posts
since Nov 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in JavaScript / DHTML / AJAX Forum Timeline: Checkbox Help
Next Thread in JavaScript / DHTML / AJAX Forum Timeline: javascript form help





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC