Re: [JSMentors] Onload event is not getting fired for dynamic script loading

2011-12-07 Thread Diego Perini
On Wed, Dec 7, 2011 at 3:02 AM, S.A. game...@gmail.com wrote: Most of what is shown in the example is a scaffolding to have it work in older IEs as well. You are right, to have the code only work on the latest browsers, we don't need all that code. As I have indicated in one of my previous

Re: [JSMentors] Onload event is not getting fired for dynamic script loading

2011-12-07 Thread Mark McDonnell
Is this https://github.com/Integralist/XHRl what you're after? Sent from my iPhone On 7 Dec 2011, at 02:02, S.A. game...@gmail.com wrote: Most of what is shown in the example is a scaffolding to have it work in older IEs as well. You are right, to have the code only work on the latest

Re: [JSMentors] Onload event is not getting fired for dynamic script loading

2011-12-07 Thread S.A.
It seems that you got the script body through XMLHttpRequest already then doing this? Then you don't have to. Why don't you just create a dynamic script element and assigen the src attribution to it? Yes, Diego's example indicated that and that works in the latest browsers. Any thoughts

Re: [JSMentors] Onload event is not getting fired for dynamic script loading

2011-12-06 Thread Diego Perini
On Tue, Dec 6, 2011 at 6:29 PM, S.A. game...@gmail.com wrote: Ok, it is inserted at the right place, but are you sure, that there will be a readstatechange event? Didn't it already fired by the time that you insert your script? Also if you ever looked up the jQuery source, you can see, that