473,811 Members | 3,701 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Please Wait X Seconds... Url Revealer

3 New Member
Hey I need help (doesn't everyone?) on a script. The script functions like this:
Please wait X seconds for download (for example x=15 seconds)
Please wait 14 seconds for download (and then a second later)
Please wait 13 seconds for download... (process keeps repeating)
Click here to download the file you requested (occurs at 0 seconds)

Does anyone know of a script like that one? I have seen many sites use it including megaupload.com. I am running a site with many downloads and the ones that are files over 3 megabytes must have a timer inorder to conserve bandwidth (and files over 5 megabytes download speed will be limited to 25kbps, but I have found a script on how to do that using php). If you know what language this script is written in (I am guessing javascript or php) and could possible provide me with an example or a place I can find that script it would be of a great help to me. Thanks a bunch.
Jul 16 '06 #1
2 6027
iam_clint
1,208 Recognized Expert Top Contributor
Expand|Select|Wrap|Line Numbers
  1. <html>
  2. <body onload="waittimer();">
  3. <script>
  4. var secs
  5. var timerID = null
  6. var timerRunning = false
  7. var delay = 1000
  8. function waittimer() {
  9.     secs = 10
  10.     StopTheClock()
  11.     StartTheTimer()
  12. }
  13. function StopTheClock() {
  14.     if(timerRunning)
  15.         clearTimeout(timerID)
  16.     timerRunning = false
  17. }
  18. function StartTheTimer() {
  19.     if (secs==0)
  20.     {
  21.               StopTheClock()
  22.     document.getElementById("time").innerHTML = '<a href="downloadlink.exe">Link</a>'
  23.  
  24.     }
  25.     else
  26.     {
  27.         document.getElementById("time").innerHTML = secs + " SECONDS Untill Download"
  28.         secs = secs - 1
  29.         timerRunning = true
  30.         timerID = self.setTimeout("StartTheTimer()", delay)
  31.     }
  32. }
  33.  
  34. </script>
  35. <div id="time"></div>
  36. </body>
  37. </html>
  38.  
heres a small example i made up for you se you get todo the rest :P its a countdown yadda yadda if you need help with it let me know
Jul 16 '06 #2
bigpoppa
3 New Member
HOLY KDJSFKFJDS THANX 200000X. I spent over 2 hours searching for this type of script... you are my hero :)
Jul 17 '06 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
1617
by: Pudibund | last post by:
Ok, I've spent nearly a week trying to sort what should be an easy task to accomplish but I'm totally flumoxed! I want to do something pretty simple... 1. display image1 2. wait until image1 is drawn to the screen
5
7933
by: Erwin Kloibhofer | last post by:
what if i have a webpage that displays the text "please wait, this may take a few seconds..." and it now waits until some event on the server happens. whatever this is, this can be quick, but it could also be slow, or it can even fail. but once this event has happened, i want the webpage to reload and display a different message, like "the process completed successfully". my question now is, how would i achieve this without constant...
1
19140
by: pokémon | last post by:
Can someone please post a working example of how to use the WaitAny() method. Thanks.
5
1711
by: Chris | last post by:
Hi, I was following the article http://msdn.microsoft.com/msdnmag/issues/03/12/DesignPatterns/default.aspx I got everything working until I go the the Progress bar section. Here is where I am stuck. This is the vb.net code for the wait.aspx page Public redirectPage As String = "" Public secondsToWait As String = "0"
15
22183
by: Snuyt | last post by:
Hello, I want the program to wait a few seconds between executing code. It should look something like this: public sub xx() ...code... wait(2) 'wait 2 seconds ...code...
4
3504
by: puja patel | last post by:
hi all, I am developing a shopping cart website in C# where after selecting item, user enters credit card details and click on submit button.This request is then processed by the gateway which usually takes from 5-10 sec of waiting period to get response back if the transaction was approved of declined. I want to implement page which says "Please wait...your request is being processed." after user clicks on submit button and before I...
4
35857
by: MrDeej | last post by:
Hello guys! I am trying to use trevors wait function on my odbc database for a countdown function. But this function is not stable as it sometimes dosent actually wait before launching next line of code The database is a ODBC update database which is full automatic startup/shutdown but because i sometimes want to make som edits to it i want a countdown before it shutsdown with a "cancel shutdown" code. Wait(1)...
5
3239
by: Jeremy | last post by:
Hi all, I have database actions that will potentially take several seconds to complete. My normal page uses AJAX so keeping the user informed of what is happening is not a problem. However, the page also has fallback code in case of no Javascript. In this case I would like to display temporary "please wait" type page
2
1053
by: =?Utf-8?B?cm9kY2hhcg==?= | last post by:
hey all, i have a key up javascript function where i want half the function to run and then wait about 2 seconds, but if within that 2 seconds another key up event has a occurred, i need it to cancel the initial call to the function. can someone please show me if this can be done. thanks, rodchar
0
9605
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10651
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10405
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10136
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7671
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5556
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4342
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3871
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3020
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.