Re: [Proto-Scripty] IE6 cannot run dynamicly inserted script tag

2010-03-16 Thread Daan Mortier
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

Re: [Proto-Scripty] this and setTimeout in Prototype-based class

2009-12-04 Thread Daan Mortier
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

Re: [Proto-Scripty] this and setTimeout in Prototype-based class

2009-12-04 Thread Daan Mortier
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