setTimeout

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
User avatar
moiseszaragoza
Forum Commoner
Posts: 87
Joined: Sun Oct 03, 2004 4:04 pm
Location: Ft lauderdale
Contact:

setTimeout

Post by moiseszaragoza »

I am wandering i cant set a delay on a newWindow?

Code: Select all

setTimeout(window.open("survey.asp"),10000); // opens a new window in 10sec 
but it opens it as soon as i click

thanks
User avatar
Burrito
Spockulator
Posts: 4715
Joined: Wed Feb 04, 2004 8:15 pm
Location: Eden, Utah

Post by Burrito »

you need quotes around your window.open() method

Code: Select all

setTimeout("window.open('survey.asp')",10000);
Post Reply