Advanced Search

Results 1 to 3 of 3

Thread: Using Content Glider V2.4 Within Ajax Dynamic Content loaded Page

  1. #1
    Join Date
    Apr 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Using Content Glider V2.4 Within Ajax Dynamic Content loaded Page

    Describe problem:

    URL to script:
    http://www.dynamicdrive.com/dynamici...tentslider.htm

    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.

    Regards,

    Keir

  2. #2
    Join Date
    Apr 2010
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    anyone help with this problem please?

  3. #3
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    28,701
    Thanks
    43
    Thanked 3,133 Times in 3,097 Posts
    Blog Entries
    12

    Default

    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?
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •