Google Answers Logo
View Question
 
Q: how do you set a time delay before loading a ".js" file in IE ( No Answer,   1 Comment )
Question  
Subject: how do you set a time delay before loading a ".js" file in IE
Category: Computers > Programming
Asked by: aaronmillman-ga
List Price: $2.00
Posted: 21 Mar 2005 01:33 PST
Expires: 22 Mar 2005 21:52 PST
Question ID: 497902
In Javascript in IE, how do you set a time delay before loading a
script file (a ".js" file).  The main thing is that the browser wait
like 5 or 10 seconds for the new information before retrieving the
dynamicaly created script file.
Answer  
There is no answer at this time.

Comments  
Subject: Re: how do you set a time delay before loading a ".js" file in IE
From: willcodeforfood-ga on 21 Mar 2005 08:47 PST
 
module1.js can be a blank file
module2.js is the file you want to load after a delay


<html>
<head>
	<script language='JavaScript' src='module1.js' id='scriptTag'></script>
</head>
<body>
	Test delayed loading of script file.
</body>
	<script>
	function getnewscript()
	{
		document.all("scriptTag").src = "module2.js"
	}
	setTimeout("getnewscript()",5000)
	</script>
</html>

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