Wait!!!

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
User avatar
SheDesigns
Forum Commoner
Posts: 42
Joined: Tue Nov 18, 2008 9:51 am
Location: Buffalo, NY

Wait!!!

Post by SheDesigns »

I need this to WAIT for about 10 seconds before it closes the window. I've tried sleep, no luck.

Code: Select all

print("<script language=\"Javascript\">\n");
print("function reloadparent(){\n");
print("window.opener.document.location='http://www.apple.com/';\n");
print("window.opener.document.location.reload();\n");
print("window.close();");
print("}\n");
print("</script>\n");
 
print("<body onLoad=\"window.close()\">\n");
print("<body onLoad=\"reloadparent()\">\n");
print("</body>\n");
print("</html>\n"); 
:) Help?
User avatar
pickle
Briney Mod
Posts: 6445
Joined: Mon Jan 19, 2004 6:11 pm
Location: 53.01N x 112.48W
Contact:

Re: Wait!!!

Post by pickle »

Put it in a function & call it via setTimeout()
Real programmers don't comment their code. If it was hard to write, it should be hard to understand.
Post Reply