How do I append a string to form results using javascript?
<p>I've got a form which posts its results using "get" method. I was wondering how I could add some additional values to these results before they  are submitted.</p>

<p>What I did so far is overload the submit function so I could concat my additional string 
which I wish to pass along with the form results to the destination url. </p>

<p>On regular submit the destination url gets the results as follows:</p>

<pre><code>   ..dest url?txtName=e&amp;txtAge=r&amp;gender=mail&amp;select=1
</code></pre>

<p>What I am attempting to do is append  another string to these results</p>

<pre><code>  ..dest url?txtName=e&amp;txtAge=r&amp;gender=mail&amp;select=1|myStringResult
</code></pre>

<p>I've overloaded the submit </p>

<pre><code>    function overLoadSubmit() 
    {
        window.addEventListener('submit', newSubmit, true);
        HTMLFormElement.prototype._submit = HTMLFormElement.prototype.submit;
        HTMLFormElement.prototype.submit = newSubmit;
    }
</code></pre>

<p>The original submit is called after <code>newSubmit()</code>, and that's where I would like to append my string.</p>

<pre><code>    function newSubmit()
    {           
        var myForm = document.forms[0];
        var s = "|myStringResult";             
        // here is where i would like to append s ,
        // but i can't figure out how to reference the form results  
        // or how to add it to the original submit
    }
</code></pre>

<p>I've also tried adding an hidden input control </p>

<pre><code>    &lt;input type="hidden" id="_body" value="getValues();"/&gt;
</code></pre>

<p>since myResultString is really long and is in fact an entire html document </p>

<pre><code>    function getValues() 
    {
        var _doc = document.childNodes[1].innerHTML;
        return '|' + _doc; 
    }
</code></pre>

<p>This doesn't seem to work. </p>
