Web Hosting Talk







View Full Version : [Javascript] Multiple functions help


Oshaka
09-13-2006, 03:20 PM
Hello,

If I try 2 execute these 2 functions at the same time it will not work unless I click the link twice.

function open_win(args1,args2)
{
newplayer = window.open(args1,args2);
}



function Play(args1,args2,...)
{
if(!newplayer)
{
open_win('args1','args2'...); // first function

newplayer.Load(args1, args2, args3); // second function
}


Thank you!

Ks Jeppe
09-14-2006, 04:15 PM
just call play() at the end of open_win? :) maybe make a setTimeOut for a second or two before calling it so the computer has a chance to load the window in question?