sending form data across two pages with added javascript
<p>I'm stuck! - I have a search form, that when data is entered and submitted, the data is sent to another page! - this works well see eg below.</p>

<p>My problem is, I have a piece of javascript called "greybox", it basically loads an external, dimming the first page and focusing on the external - see eg below.</p>

<p><a href="http://www.nctfleetlist.co.uk/normal.php" rel="nofollow">normal working</a></p>

<p>The new window can be called via either a href "rel" link or an "onclick" command.</p>

<p>I have tried implementing the the two together to no success..Whichever method I use, when i use the greybox the data from the original form is not passed over! - this is what I have so far...</p>

<p>example1, Using standard form with an "onclick" function on the submit button <a href="http://www.nctfleetlist.co.uk/eg1.php" rel="nofollow">example 1</a></p>

<pre><code>    &lt;body&gt;
    &lt;script&gt;
    GB_show(caption, url, /*optional*/ height, width, callback_fn)
    &lt;/script&gt;
    &lt;form name="form1" action="test_script.php" method="post"&gt;
    &lt;input type="text" name="var1" value=""&gt;
    &lt;input type="submit" name="submit" value="submit" onclick="return GB_show('Search',                           'http://www.nctfleetlist.co.uk/test_script.php', this.href)"&gt;
    &lt;/form&gt;
    &lt;/body&gt;
</code></pre>

<p>example 2 - using "onsubmit" [example 2][3]</p>

<pre><code>    &lt;body&gt;
     &lt;script&gt;
     GB_show(caption, url, /*optional*/ height, width, callback_fn)
      &lt;/script&gt;
      &lt;form name="form1" action="test_script.php" method="post" onSubmit="return     GB_show('Search', 'http://www.nctfleetlist.co.uk/test_script.php', this.href)"&gt;
       &lt;input type="text" name="var1" value=""&gt;
       &lt;input type="submit" name="submit" value="submit"&gt;
       &lt;/form&gt;
        &lt;/body&gt;
</code></pre>

<p>example 3 - using a javascript text link </p>

<pre><code>    &lt;body&gt;

    &lt;form name="form1" action="test_script.php" method="post"&gt;
        &lt;input type="text" name="var1" value=""&gt;
        &lt;a href="#" onclick="document.forms[0].submit()" rel="gb_page_center[720, 300]"&gt;Search&lt;/a&gt;
          &lt;/form&gt;

               &lt;/body&gt;
</code></pre>

<p>To see the other working pages, simply change eg1.php to eg2.php or eg3.php</p>

<p>If anyone can help me, it would be much appreciated!</p>
