Results 1 to 4 of 4

Thread: Dynamic Ajax Content - how do I set default page

  1. #1
    Join Date
    Sep 2008
    Location
    Seattle, WA
    Posts
    135
    Thanks
    1
    Thanked 11 Times in 11 Posts

    Default Dynamic Ajax Content - how do I set default page

    Dynamic Ajax Content
    http://www.dynamicdrive.com/dynamici...jaxcontent.htm

    I'd like to set one of the pages to load immediately when the page loads. How can I set the code to load say Page A instead of having to select a page as the first item displayed?

  2. The Following User Says Thank You to simcomedia For This Useful Post:

    Seldimi (09-15-2008)

  3. #2
    Join Date
    Aug 2004
    Posts
    10,143
    Thanks
    3
    Thanked 1,008 Times in 993 Posts
    Blog Entries
    16

    Default

    Assuming your link to load an ajax content when clicked on looks like this:

    Code:
    <a href="javascript:ajaxpage('test.htm', 'contentarea');">test</a>
    To get it to load automatically when the page loads, you'd simply modify the above to:

    Code:
    <script type="text/javascript">
    
    ajaxpage('test.htm', 'contentarea')
    
    </script>
    Make sure this script is added after the DIV with the ID "contentarea", not before.
    DD Admin

  4. The Following 2 Users Say Thank You to ddadmin For This Useful Post:

    cyberjorge (09-17-2008),simcomedia (09-16-2008)

  5. #3
    Join Date
    Sep 2008
    Location
    Seattle, WA
    Posts
    135
    Thanks
    1
    Thanked 11 Times in 11 Posts

    Default

    Thanks for the info. Worked like a charm

  6. #4
    Join Date
    Nov 2008
    Posts
    27
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Default add to code page

    Thanks from me also. It would be an idea to add this to the example code page.

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
  •