Forum Moderators: open
I have a page1.php with links to page2.php.
On clicking the link to page2.php (from page1.php) I want a small popup window to appear for 5 seconds advising the user that he will be automatically re-directed to page3.php. Then the popup window will close and page3.php will open automatically.
The possibly tricky bit is the only page that I can amend is page2.php. I cannot amend page1.php.
How do I code this?
Thanks, Pete
<a href="#" onClick="window.open('page2.php');">click here</a>
In page2.php you would have the following JavaScript to triggered on a timer which you start from onload.
window.opener.location='page3.php'
window.close();
I can't guarantee that it will work with all pop up blockers. It depends how selective they are about blocking window.open. The better ones don't block the ones that require a user action.