G
gert
is there any way i can make setTimeout work with a private obj ?
function() {
var obj
setTimeout("thread(obj)",0)
}
function() {
var obj
setTimeout("thread(obj)",0)
}
is there any way i can make setTimeout work with a private obj ?
function() {
var obj
setTimeout("thread(obj)",0)
}
You can send a function as the first argument to setTimeout. This
function's closure will contain obj.
function() {
var obj;
setTimeout(function(){thread(obj);},0);
}
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.