Page 1 of 1

setTimeout

Posted: Mon Feb 05, 2007 5:05 pm
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

Posted: Mon Feb 05, 2007 5:30 pm
by Burrito
you need quotes around your window.open() method

Code: Select all

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