Jump to content

is there way to delay a script from running?


jeger003

Recommended Posts

hello,

is there a way to pause a few seconds before running a script.

 

what im doing is, when a visitor clicks a download button. I want it to pause like 5 seconds and show a little logo before running the script to download the file.

 

 

any ideas with this?

 

Thanks Guys!

With all due respect, JavaScript is not required

<html>
<head>
<meta http-equiv="refresh" content="5;url=http://yoursite.com/file.pdf">
</head>

<body>

Your file will download in 5 seconds. If it does not start automatically, click
<a href="http://yoursite.com/file.pdf">here</a>.

</body>
</html>

With all due respect, JavaScript is not required







Your file will download in 5 seconds. If it does not start automatically, click
here.


 

No worries if that solves his problem, but it wasn't what he asked for.  He asked to click a button -- display a message and then do the download, so I discounted the meta refresh. 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.