Closed Thread Icon

Preserved Topic: how can you send objects? Pages that link to <a href="https://ozoneasylum.com/backlink?for=18215" title="Pages that link to Preserved Topic: how can you send objects?" rel="nofollow" >Preserved Topic: how can you send objects?\

 
Author Thread
kars10
Bipolar (III) Inmate

From: Europe
Insane since: Mar 2001

posted posted 07-23-2001 11:51

that's the question:
how can I send objects from a function to another one using the setTimeout-thigythig?
ka10

Slime
Lunatic (VI) Mad Scientist

From: Massachusetts, USA
Insane since: Mar 2000

posted posted 07-23-2001 14:03

An entire object? You'll have to have it declared outside the function, so it has a global scope...

var myobj = new Object();

function myfunc(theobject)
{
theobject.dosomething();
setTimeout('myfunc(myobj)',1000);
}

myfunc(myobj);

« BackwardsOnwards »

Show Forum Drop Down Menu