Using javascript/jquery to submit a form upon the loading of a page
<p>I wrote an array to pass variables in the GET to a search page. The search page only has 4 fields but I'm only passing the most important variables, first name and last. Here is the array:</p>

<pre><code>&lt;?php echo "&lt;td&gt;&lt;a href='" . matry::base_to('test/trace', array('first'=&gt;$patient-&gt;first , 'last' =&gt;$patient-&gt;last)) . "'&gt;&lt;ul class='controls'&gt;
                    &lt;li id='check_orders'&gt;&lt;`span class='symbols'&gt;L&lt;/span&gt;&lt;span class='label'&gt;Skip Trace&lt;/span&gt;&lt;/li&gt;

                &lt;/ul&gt;&lt;/a&gt;&lt;/td&gt;";?&gt;
</code></pre>

<p>When the page loads i'm just echoing the _GET to pre populate the first and last input fields on that page.. </p>

<p>What I'm looking for is a script that will execute the search with the first and last name fields populated as that page loads automatically. Additionally, when the search is executed it's populating in an iframe. (forgot about that part)~!</p>

<p>I tried using: </p>

<pre><code>&lt;script&gt;document.getElementById('stack').submit();&lt;/script&gt;

 &lt;form action='http://xxxx.yyyyyyy.com/stuffhere' name='es' target="my_iframe" id="stack"&gt;
</code></pre>

<p>with no avail. </p>
