This little Demonstration shows how to dynamically load
arbitrary data into an existing document with the XMLHttpRequest function.
I added a file selection tool for convenience, as well as some crude error handling.
BEWARE ! THIS IS POTENTIALLY VERY DANGEROUS !
Look how the page is broken when it is loading itself...
Funnier is to load auto-index.html (even if the links don't work).
The file test_embedded_js.html shows that JS in a HTML file is not reinterpreted, but the rest is still valid, and embedded CSS may overload the existing page layout.