Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do you delay something?

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I have the following code which opens two things when you click on a link.

function video1()
{
location.href="james.html";
window.open('video1.html', 'video', 'toolbars=0,scrollbars=0,location=0,statusbars=0,menubars=0,resizable=1,width=160,height=180,left=260,top=138');

}

What I want is, for the second bit (the video.html) to open about 5 seconds after the other thing.

How do I do this?

Many thanks

James
 
you can use a setTimeout()

setTimeout("function()", 5000); adam@aauser.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top