View Single Post
Old 11-16-2012, 07:07 AM   PM User | #2
devnull69
Senior Coder

 
Join Date: Dec 2010
Posts: 2,245
Thanks: 10
Thanked 531 Times in 525 Posts
devnull69 will become famous soon enough
One of the problems is this (not the full solution!)
Code:
setTimeout(showWindow("text1"), 2000);
This will not do what you expect. It will call showWindow() immediately because you append parentheses () to the function name. After 2 seconds it would run a callback if and only if you would return a function object from showWindow(), which you don't.

Try this
Code:
setTimeout(function() {showWindow("text1")}, 2000);
devnull69 is online now   Reply With Quote