View Full Version : Using Content Glider V2.4 Within Ajax Dynamic Content loaded Page

04-20-2010, 10:13 PM
Describe problem:

URL to script:

Basically I am using the Ajax Dynamic Content script to load a page within my index page - however this script does not allow for inline scripts on the page that is being loaded - I wish to use content glider v2.4 within this page that is being loaded dynamically, but content glider Requires that I have an inline script below the glider, I have tried saving this to an external file and calling it with the page being loaded using the loadobjs function, however this loads the script before it is required and the result is an error msg, so what I need is someway of loading the inline script on the page being loaded as an external js s file, but after the rest of the DOM has loaded.

I hope I have explained the problem clearly enough.

Thanks very much in advance if anyone can help, been frustrated by this problem all day.



04-24-2010, 04:41 PM
anyone help with this problem please?

04-25-2010, 04:42 PM
I don't think your solution will work. You have to initialize the Glider after its content has arrived. So you not only need to get the code for that associated with the page, you also have to execute it. This whole business with loadobjs is a bit of a red herring. Regardless of when it's used, you cannot accomplish anything with it that cannot be done simply by having the code on the page to begin with.

What you need to do is react after the onreadystatechange event for the AJAX call has written the content to the page, then you can initialize it by calling a function that will execute the code required at that point. Sometimes that's all you need to do, but other times it can get more complex.

Exactly which AJAX script are you using?