473,789 Members | 2,446 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

setTimeout("thr ead(obj)",0)

is there any way i can make setTimeout work with a private obj ?

function() {
var obj
setTimeout("thr ead(obj)",0)
}
Dec 15 '07 #1
2 1760
On Dec 14, 7:08 pm, gert <gert.cuyk...@g mail.comwrote:
is there any way i can make setTimeout work with a private obj ?

function() {
var obj
setTimeout("thr ead(obj)",0)

}
You can send a function as the first argument to setTimeout. This
function's closure will contain obj.

function() {
var obj;
setTimeout(func tion(){thread(o bj);},0);
}

Peter
Dec 15 '07 #2
On Dec 15, 4:36 am, Peter Michaux <petermich...@g mail.comwrote:
On Dec 14, 7:08 pm, gert <gert.cuyk...@g mail.comwrote:
is there any way i can make setTimeout work with a private obj ?
function() {
var obj
setTimeout("thr ead(obj)",0)
}

You can send a function as the first argument to setTimeout. This
function's closure will contain obj.

function() {
var obj;
setTimeout(func tion(){thread(o bj);},0);

}
Thank you very much :)
Dec 15 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.