Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I reload a page and have a function execute following the reloa

Status
Not open for further replies.

robert89

Technical User
Nov 19, 2003
125
0
0
CA
I have a slideshow script. The slideshow has four controls:
next play pause previous

The play function starts the slideshow, however, once the slides have cycled through once, the play will not restart unless the page is reloaded.

the line that executes the play is:
onclick="javascript:slides3.play();

I would like to have the play function reload the page first and then play the slisdes. How can I work reload into this.
i.e. onclick="javascript.location.document.reload(); and then have the play function run?

Help appreciated.

Bob
 
You can add onLoad="slides3.play()" to the body tag of your page. However it seems to me it would be better to fix the problem with the slideshow object if you have that option than to reload the page.

 
Without seeing the script, it's hard to say for sure, but I imagine there's a variable somewhere you need to reset to indicate the current (or next) picture number to show, before calling the play method.

Dan



[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top