Delayed Execution of Javascript
| <meta http-equiv="refresh" content="0;url=http://www.mydomain.com/download_file.zip"> |
|
<script language="javascript"> var exitsplashalertmessage = '***************************************\n\n > > > W A I T < < <\n\n CLICK THE ***CANCEL*** BUTTON\n on the NEXT Window for Something\n VERY Special!\n\n************************************** *'; var exitsplashmessage = '***************************************\n\n W A I T B E F O R E Y O U G O !\n\n CLICK THE *CANCEL* BUTTON RIGHT NOW\n TO STAY ON THE CURRENT PAGE.\n\n I HAVE SOMETHING VERY SPECIAL FOR YOU!\n\n***************************************'; var exitsplashpage = 'http://www.redirectpage.com'; </script> <script language="javascript" src="http://www.mydomain.com/exitsplash.php"></script> |
The problem is that, when these 2 pieces of codes are installed at a page, when the download executes, the exit message pops up (which is not what I wanted). The exit message is suppose to pop up when the user leaves the page.
So what I can think of right now is to delay the exitsplash.php for 5 seconds or so? and when the user has downloaded the file(which the message won't pop up since it's disabled for 5 seconds), the exitsplash.php goes back normal.
Is it possible to do this?
Thanks
Are you using WordPress? Have you tried qSandbox yet?
>> 72 Hour Special <<