submitting the form right after echoing it in PHP
<p>I have echoed out a form in PHP and I'm submitting it with by echoing out the relevant JS:</p>

<pre><code>echo "&lt;form method = 'post' action = 'test.php' id = 'test'&gt;
&lt;input type = 'hidden' name = 'a' value = '1' /&gt;
&lt;input type = 'hidden' name = 'b' value = '2' /&gt;
&lt;input type = 'hidden' name = 'c' value = '3' /&gt;
&lt;/form&gt;";
echo "&lt;script type = 'text/javascript'&gt;document.getElementForm ('test').submit();&lt;/script&gt;";
</code></pre>

<p>Would this be incorrect ? It seems to work for me but I'm just concerned that I'm not waiting for the form to load and submitting the form. Or is it that the form completes loading by the time I'm calling submit ? Technically, it should load right ? As everything is sent to browser in the order it was outputted...</p>
