molendijk
08-19-2008, 05:34 PM
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 (http://www.dynamicdrive.com/dynamicindex17/ajaxincludes.htm).
4) URL TO CODE: http://molendijk.110mb.com/include_with_write_and_inner/ajaxinclude_with_write_and_inner.html
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 (http://www.dynamicdrive.com/dynamicindex17/ajaxincludes.htm).
4) URL TO CODE: http://molendijk.110mb.com/include_with_write_and_inner/ajaxinclude_with_write_and_inner.html