Results 1 to 5 of 5

Thread: Ajax Includes Script I

  1. #1
    Join Date
    Sep 2007
    Location
    The Netherlands
    Posts
    1,881
    Thanks
    49
    Thanked 266 Times in 258 Posts
    Blog Entries
    56

    Default Ajax Includes Script I

    1) CODE TITLE: Ajax-includes: combining document.write and innerHTML

    2) AUTHOR NAME/NOTES: Arie Molendijk

    3) DESCRIPTION: Using document.write for the Ajax-responseText automatically brings all of the external css and js to the main file (with innerHTML, that cannot be achieved). The disadvantage of the document.write-method, however, is that it does not allow dynamically updating the page.
    The script offered here proposes a solution, by combining document.write and innerHTML.
    Inspired by DD's Ajax Includes Script.

    4) URL TO CODE: http://molendijk.110mb.com/include_w...and_inner.html

  2. #2
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    I say turn it into ajax tabs. That'd be good.
    Jeremy | jfein.net

  3. #3
    Join Date
    Sep 2007
    Location
    The Netherlands
    Posts
    1,881
    Thanks
    49
    Thanked 266 Times in 258 Posts
    Blog Entries
    56

    Default

    Nile, that would be a possibility.
    But when I wrote the script, I was primarily interested in the question how static document.write can be 'made like' dynamic innerHTML.
    Note that DD's Ajax-tabs use innerHTML only. So the Ajax-tabs script does not automatically bring external js/css to the main file. My script does.
    ===
    Arie.

  4. #4
    Join Date
    Jan 2008
    Posts
    4,168
    Thanks
    28
    Thanked 628 Times in 624 Posts
    Blog Entries
    1

    Default

    There is a version of the ajax tabs that does get external files though. Just make tabs too, for an example of what it would look like for people, and if they wanted to use tabs, they could.
    Jeremy | jfein.net

  5. #5
    Join Date
    Sep 2007
    Location
    The Netherlands
    Posts
    1,881
    Thanks
    49
    Thanked 266 Times in 258 Posts
    Blog Entries
    56

    Default

    Quote Originally Posted by Nile View Post
    There is a version of the ajax tabs that does get external files though.
    I was not talking about external files (every Ajax-script can include external files), but of the css/js belonging to them. My script automatically brings them to the main file, without forcing you to 'name' them in the ajax-script.
    ===
    Arie.

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
  •