Results 1 to 5 of 5

Thread: Help on Dynamic Ajax Content

  1. #1
    Join Date
    Feb 2009
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Help on Dynamic Ajax Content

    1) Script Title: Dynamic Ajax Content

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamici...jaxcontent.htm

    3) Describe problem: This is a great script and I am using it to load a few external pages. However the CSS and JS on that external page doesn't seem to load on the "right column" which is the designated content area. I used the additional couple of codes at the bottom to load them as you have instructed but it still comes up without it...

    I have been trying to use Dreamweaver CS4 and it's 3rd party widgets like jquery, phatfusion ect and ran into similar issues as they didn't seem to work toghether. So I am wondering if such an issue effecting this problem as well, because...

    First, on the left column instead of the regular links as in the demo, I am using a vertical CMotion Image Gallery from Dynamic Scripts. This works correctly when I link the image buttons to the external.html files given with the Demo.

    Next, the external page has a jquery lightbox plugin gallery which uses jquery scripts along with it's css. This works without a glitch on it's own.

    Finally, I have to say I am a front end designer and not a developer... so please bare with me for this trouble... Any help is much appreciated.

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    The loadobjs() function of this script is actually a bit of a red herring. Using it is no different than if you have the style and/or scripts it is meant to import already on the 'top' page, that is if it works, which it doesn't always because sometimes there isn't enough time to import.

    So, whatever style you want for your imported content, just put on or link it to the 'top' page in the usual manner as is done for a non-AJAX page.
    - John
    ________________________

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

  3. #3
    Join Date
    Feb 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation Help

    Whatever I try I cannot load javascript into a <Div> via the Dynamic Ajax Content script using loadobjs
    http://www.dynamicdrive.com/dynamici...jaxcontent.htm

    I am using Jquery as well on the inital page, but I have removed it and it still will not load the external javascript in a div.

    This is my URL link in the page.

    <a href="javascript:ajaxpage('Events/October.htm', 'EventContent'); loadobjs('css/tabcontent.css', 'js/tabcontent.js')">October</a>

    The link succesfully loads the external page October.htm AND the CSS! into the correct DIV on my page. but not the javascript it uses. It is not a spelling error or path error.

    I have tried loading the tabcontent.js in the head of the main page.
    <script type="text/javascript" src="js/tabcontent.js"></script> But still no luck.

    What am I missing????
    Please help.. I really don't want to have to use an IFRAME!

  4. #4
    Join Date
    Feb 2009
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Unhappy

    I absolutely love this script but I'm having the same issue with js. ANYTHING using JS from the linked page doesn't work in the div. I have tried loading the js via the main page as well but that didn't fix it. The page I'm (currently) trying to load has the js in the page itself, not imported, so it's not a link issue. If the file is loaded outside the ajax content page it works fine.

    thanks for any advice!

  5. #5
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    You cannot load javascript via AJAX. If the scripts you want to run against AJAX imported content are already on the 'top' page it may work. If not, they must be reinitialized (sometimes, to avoid breaking a particular script, this must be just a partial reinitialization) after the imported content arrives, or some other method of getting the imported markup recognized by the script must be used.

    This question was originally about style. That's easy, just put it on the 'top' page.

    Now, each script someone might want to use in an environment where AJAX is involved will usually have different potential workarounds, at least in their details.

    So, please - if you are not the person who started this thread, start a new thread about your specific issue(s).
    - 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
  •