pass image id into form and submit with jQuery
<p>I have a few images on a page. Each image has an id value assigned. I need to get image id, pass it into a form and submit that form when the image is clicked.</p>

<pre><code>&lt;IMG SRC="img1.gif" id="var1"&gt;
&lt;IMG SRC="img2.gif" id="var2"&gt;

&lt;form method="post" id="myForm" action="thisPage.php"&gt;
&lt;input type="hidden" name="myID"&gt;
&lt;/form&gt;
</code></pre>

<p>How do I pass the value from image into form?</p>

<p>Now, I do know I can use ajax with jQuery, but in this case I actually need to submit to this page and reload it after submitting.</p>
