Results 1 to 2 of 2

Thread: "onload" when loading external content dynamicly with AJAX

  1. #1
    Join Date
    Dec 2006
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default "onload" when loading external content dynamicly with AJAX

    1) Script Title:
    Dynamic Ajax Content

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


    3) Describe problem:
    I have a navigation bar set up that uses AJAX to dynamically load content into the "contentDIV" on my page. The content being loaded ("info.html") contains two more divs that I want to dynamically load content into using AJAX.

    Everything works fine if I place an HREF on the "info.html" page, when those are clicked it loads the two other html pages into it's DIVs.

    However, what I am trying to do is have these 2 DIVs contained in "info.html" load the dynamic content as soon this info.html is loaded into my contentDIV on the main page. It seems to me that when Ajax loads this page it does not run any <script> placed within the info.html page.

    Is there a way to invoke an onload function to execute the script that will load the content into the 2 "sub" DIVs on info.html?

    I have just tried placing the "ajax" function into a <body onload=""> in info.html, but this doesn't work either.
    (<body onLoad="ajaxpage('project123/1.html', 'pCreative');">) This does work if I pull up info.html directly in the browser, but not if info.html is being loaded using AJAX to the contentDIV on my main page.

    TIA,
    alex
    Last edited by netridah; 12-13-2006 at 06:31 PM.

  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

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
  •