To go back to the default state, in the demo, just make up a page that has only this on it:
HTML Code:
<h2>Choose a page to load.</h2>
Make that be an option (link). Just make sure that if you are loading any styles, that these will not affect that page or the 'top' page. If you are adding a lot of stuff to the page, the only real way to go back to its default state is to reload it, if it is called demo.htm:
<a href="demo.htm">Start Over</a>
Loading a javascript and executing it against newly loaded content are often two different things. Especially, if the script needs to initialize the content. This is usually the case with a script that has an onload event.
See:
http://www.dynamicdrive.com/forums/s...ad.php?t=17426
Bookmarks