Results 1 to 5 of 5

Thread: [DHTML] Ajax includes with document.write and innerHTML

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

    Default [DHTML] Ajax includes with document.write and innerHTML

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

    2) AUTHOR NAME/NOTES: Molendijk

    3) DESCRIPTION: See title. I wrote this for myself, but it may also be of use to some of you.

    4) URL TO CODE: http://molendijk.110mb.com/include_v.../includer.html
    Last edited by molendijk; 06-29-2008 at 07:51 PM.

  2. #2
    Join Date
    Jun 2007
    Posts
    543
    Thanks
    3
    Thanked 78 Times in 78 Posts
    Blog Entries
    1

    Default

    very nice script, but a couple of minor things:
    1. shouldn't document.includeWrite be document.prototype.includeWrite, and document.includeInner be document.prototype.includeInner

    2. for the includeInner function, wouldn't it be more functional if it returned the value?
    [Jasme Library (Javascript Motion Effects)] My Site
    /\/\@§†ê® §©®¡þ† /\/\@|{ê®
    There are 10 kinds of people in the world, those that understand binary and those that don't.

  3. #3
    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 Master_script_maker View Post
    1. shouldn't document.includeWrite be document.prototype.includeWrite, and document.includeInner be document.prototype.includeInner
    Sorry, I don't get what you mean. What would 'prototype' add regarding the practical use (outcome) of the function?

    Quote Originally Posted by Master_script_maker View Post
    2. for the includeInner function, wouldn't it be more functional if it returned the value?
    What do you mean by 'value'?

    Anyhow, thanks for the reaction.
    -----
    Arie.

  4. #4
    Join Date
    Jun 2007
    Posts
    543
    Thanks
    3
    Thanked 78 Times in 78 Posts
    Blog Entries
    1

    Default

    Quote Originally Posted by molendijk View Post
    Sorry, I don't get what you mean. What would 'prototype' add regarding the practical use (outcome) of the function?


    What do you mean by 'value'?

    Anyhow, thanks for the reaction.
    -----
    Arie.
    it wouldn't add use, but would make it more proper (http://www.javascriptkit.com/javatutors/proto.shtml, http://www.javascriptkit.com/javatutors/proto2.shtml, http://www.javascriptkit.com/javatutors/proto3.shtml).

    i mean returning reqInner.responseText
    [Jasme Library (Javascript Motion Effects)] My Site
    /\/\@§†ê® §©®¡þ† /\/\@|{ê®
    There are 10 kinds of people in the world, those that understand binary and those that don't.

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

    Default

    I see, thanks.

    Quote Originally Posted by Master_script_maker View Post
    i mean returning reqInner.responseText
    The reqInner.responseText is in the function. For instance, I have
    function fetch_with_inner1(){document.includeInner('fetch_with_inner1.html'); document.getElementById('fetch_with_inner1').innerHTML = reqInner.responseText}
    ---
    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
  •