timaddison
10-20-2007, 05:32 PM
Main DD Script:
http://www.dynamicdrive.com/dynamicindex17/ajaxcontent.htm
Just a quick (I hope!) question. I'm making a site which injects content into a container div via the above script, and also makes use of the loadobjs method to load javascript and style sheets where relevant.
The trouble I have is that some of the javascripts (lightbox and effects, prototype framework) rely on the window load event to instantiate the classes I need.
And when the scripts are loaded via ajax they run but the neccesary trigger which instantiates the classes isn't hit, and I wondered if I could fire another Window.load event?
So far my searching and experimentation has got me nowhere, and I wondered if anyone knew of a workaround (constrained by loading the scripts at an arbitary point after the initial page had loaded)?
Thanks,
Tim
http://www.dynamicdrive.com/dynamicindex17/ajaxcontent.htm
Just a quick (I hope!) question. I'm making a site which injects content into a container div via the above script, and also makes use of the loadobjs method to load javascript and style sheets where relevant.
The trouble I have is that some of the javascripts (lightbox and effects, prototype framework) rely on the window load event to instantiate the classes I need.
And when the scripts are loaded via ajax they run but the neccesary trigger which instantiates the classes isn't hit, and I wondered if I could fire another Window.load event?
So far my searching and experimentation has got me nowhere, and I wondered if anyone knew of a workaround (constrained by loading the scripts at an arbitary point after the initial page had loaded)?
Thanks,
Tim