PDA

View Full Version : Getting loaded behind the scenes



Magic
Jul 16th, 2002, 06:46 AM
Hello. First, I'm not a real programmer. I just mess around with HTML sometimes. So be gentle with me, please.

Here is my question: I have a popup that I got from the Popup generator. The thing is, it leads to a slide show and I have a timing problem - the amount of time it takes for the pictures to load is more than the time alloted, so you don't get to see some pictures or you don't get enough time the first time around. After that, the pictures are already loaded and the timing is right.

So what I want is for the word "Loading" to appear after people indicate they want the slideshow. I want a bar to indicate how long they have to wait or something. Then when it is loaded I want it to just take off. I would know how to get it to do something once the initial page is loaded, but what I want is for the pictures to be loading behind the scenes.

Here's the URL:
http://members.cox.net/truthsingles/slide2.html

How can I get what I want? Thanks in advance.

Magic

boxer_1
Jul 16th, 2002, 11:44 AM
Hi Magic,

This isn't what you were looking for as far as a loading status bar etc., but it should overcome the problem of the page advancing before the picture has been loaded. If you set-up this simple javascript redirect on each page and call the function onLoad, then the countdown won't begin until the image has loaded and there has been ample time to view it.

In your original code you used a meta refresh (example):

<META HTTP-EQUIV="Refresh" CONTENT="8;URL=slide5.html">

Then your image was called from within the body. If you set-up this function and call it onLoad, the countdown will start after the image has loaded. Here's an example, modifying one of your pages:

<html>
<head>
<script type="text/javascript">
function next() {
document.location='slide5.html';
}
setTimeout("next()",8000);
window.onLoad="next()";
</script>
</head>
<body background="whmarble.gif">
<center>
<img src="P7130004.jpg">
</center>
</body>
</html>

Note that the meta was left out and replaced by the javascript function. You could add this to each of your pages and the only modifications you would need to make would be to the bolded parts above...The location of the page you want to advance to next, the time delay (is set to 8 secs currently), and the image to be displayed on the current page (which you would need to do anyway).

Not really what you were after, but a fairly simple solution to the problem of the redirect occuring before the pic could be viewed I figured I'd mention. Good luck ;)

Magic
Jul 19th, 2002, 11:50 PM
Thank you for helping me, boxer.

Some of the people who use this website tell me they can't access the pictures at all. I guess they have old computers with old browsers. I'm not sure if they even get the popup window. I know there is a way around this, and I'll search through my computer clippings to see if I can find it. I love the popup window, but I could sacrifice that. I don't want to sacrifice the slideshow, though.

Is there any quick way around this? I could just redo the whole thing and let people click themselves to death to get through all of the pictures, but I don't want to do that.