PDA

View Full Version : Documents effects wipes keeps loading in a loop.



buzz74us2
12-19-2007, 02:38 PM
1) Script Title: Document Effects Wipes

2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...wipesplash.htm

3) Describe problem: I have added the wipe to my page but it keeps loading.
Below is the code wipe that I added. How do I get this to only load when you go to the page and stop the loop of loading when the page loads? It just keeps loading.

<body bgcolor="#000000">
<body onLoad="MM_goToURL('parent','wipes/wipedemo.htm');return document.MM_returnValue" ><body onload="Carousel()">
<body onLoad="goforit()">

<p>&nbsp;</p>

jscheuer1
12-19-2007, 02:58 PM
You are only allowed one body tag per page. You shouldn't be reloading the same page onload, that will result in an endless loop, regardless of any other code on the page.

You can combine the other attributes into one body tag:


<body bgcolor="#000000" onload="Carousel();goforit();">

buzz74us2
12-19-2007, 03:55 PM
I did what you said but now the page isn't loading the document effects wipe but is loading the carousal and the carousal is last. My code is below. Thanks

<body bgcolor="#000000" onload="MM_goToURL 'parent','wipes/wipedemo.htm');return document.MM_returnValue" onload="Carousel()">

jscheuer1
12-19-2007, 06:26 PM
I didn't say to do that. Why are you doing (which has a syntax error, so won't do anything as written other than possibly throw an error):



MM_goToURL 'parent','wipes/wipedemo.htm');return document.MM_returnValue

?? That's not a part of any Dynamic Drive script, and shouldn't be required for the effect. How many pages are we talking about?

Also, you can have only one onload event/attribute. If you want it to include more than one function in it, they can be combined in a single attribute:


<body bgcolor="#000000" onload="Carousel();goforit();">

That's what I suggested, not what you have.

If you need more help:

Please post a link to the page on your site that contains the problematic code so we can check it out.

buzz74us2
12-19-2007, 07:04 PM
This is the site I am working on. I apprieciate your help.

http://www.misd.k12.wi.us/mihs/football/footballdefault.htm

jscheuer1
12-19-2007, 10:09 PM
You have code on one page that loads another that, in turn has code on it that loads the first page, so of course you get an endless loop.

On footballdefault.htm you have:


<body bgcolor="#000000" onLoad="MM_goToURL('parent','wipes/wipedemo.htm');return document.MM_returnValue" >

which switches to the wipedemo.htm page, and on it you have:


function setDest() {
window.location = "http://www.misd.k12.wi.us/mihs/football/footballdefault.htm";
}

which takes you back to footballdefault.htm, which takes you to wipedemo.htm, and on and on. Remove one of these to break the loop.

buzz74us2
12-20-2007, 02:34 PM
I tried this and it will not load one of the pages. If I delete the onload wipe it will not load the wipe, if I delete the location information it will not load the main page after the intro.

jscheuer1
12-20-2007, 04:34 PM
You have to pick one, and trust that your users will click on the link to the other by themselves.