JoJo:
I'm doing some cross-site AJAX hack by dynamically inserting a script
tag. This script tag loads a PHP script that prints out javascript:
Me:
Personally, I load in the content via XmlHttp, and insert it into a
tag. There are some things to take into account when doing this. The
To pass a function to setTimeout that is binded to an object of choice, to
something along these lines:
// where obj is obviously your object
var func = function() {
this.doSomething()
}.bind( this );
window.setTimeout( func, 1000 );
Function.prototype.bind is a function that's defined in
I'm sorry, I made some typos. This is correct:
// where obj is obviously your object
var func = function() {
this.doSomething()
}.bind( obj );
window.setTimeout( func, 1000 );
Daan
On Thu, Dec 3, 2009 at 15:28, Daan Mortier daanmort...@gmail.com wrote:
To pass a function to setTimeout