parsing an html page and sending the parsed data to a another page
<p>I'm required to pass an entire content of an html, in a manner that the blank html page (the destination) will be the exact duplicate of the source page.  </p>

<p>My idea was to some how send the HTMLHeadElement and the HTMLBodyElement innerHtml's 
and some how  parse them on the other side.</p>

<pre><code>        var headElement = document.getElementsByTagName('head')[0];
        var head_source = headElement.innerHTML;

        var bodyElement = document.getElementsByTagName('body')[0];
        var body_source = bodyElement.innerHTML;
</code></pre>

<p>My dilemmas are plentiful and I hope some one would address the general problem 
and how to approach this assignment. I just need a push in the right direction.</p>

<p>So on the receiving side I'll find some way to parse the expression being sent, and build my document using the DOM approach.</p>

<p>My problems are:</p>

<p>(1) my source document (source.htm) as a form with a submit control,
 how could I overload the submit function in order to send the
 strings body_source and head_source along side the forms values?
 (the forms action="destPage.html" method="get").</p>

<p>(2) is the method "get" even an option in the manner in which I'm attempting to pass this info through ?    </p>

<p>(3) I'm pretty much open to any suggestions on how to duplicate sourcePage.htm on to destPage.htm. , maybe my approach is flawed.</p>
