Google Answers Logo
View Question
 
Q: Simple Java Script Help ( No Answer,   2 Comments )
Question  
Subject: Simple Java Script Help
Category: Computers > Programming
Asked by: ry_guy-ga
List Price: $20.00
Posted: 12 Apr 2006 09:16 PDT
Expires: 12 Apr 2006 15:19 PDT
Question ID: 718190
I need a piece of JavaScript that delays a web page from being
rendered for 5 seconds. I'm a PhD student that is studying the effects
of download delay so I'm artificially trying to create it.
Answer  
There is no answer at this time.

Comments  
Subject: Re: Simple Java Script Help
From: boggbee-ga on 12 Apr 2006 10:02 PDT
 
<script language="javascript">
function wait5()
{
d = new Date();
var c = null;
do { var c = new Date(); }
while(c-d < 5000);
}

wait5();
</script>

didn't try it out, though should work.
Subject: Re: Simple Java Script Help
From: ry_guy-ga on 12 Apr 2006 12:30 PDT
 
It works

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy