Build URL from Form Fields with Javascript or jquery
<p>I have a quick question, I can't seem to find a suitable solution to anywhere else.
I'm trying to create a URL builder form with Javascript or jquery.  Bascially, it will take the value of the two form fields, add them to a preset url and show it on a third field on submit. </p>

<p>The resulting URL might be <a href="http://www.mydomain.com/index.php?variable1=12&amp;variable2=56">http://www.mydomain.com/index.php?variable1=12&amp;variable2=56</a></p>

<p>Now, this isn't the "action" of the form and the app can't read a URL (to grab the variables) so it has to be done in page.</p>

<p>The resulting URL will be shown in the "url" named field.</p>

<p>Here's a sample of the form:</p>

<pre><code>&lt;form id="form1" name="form1" method="post" action=""&gt;
  &lt;p&gt;
    &lt;label&gt;Variable 1
      &lt;input type="text" name="variable1" id="variable1" /&gt;
    &lt;/label&gt;
  &lt;/p&gt;
  &lt;p&gt;
    &lt;label&gt;Variable 2
      &lt;input type="text" name="variable2" id="variable2" /&gt;
    &lt;/label&gt;
  &lt;/p&gt;
  &lt;p&gt;
    &lt;label&gt;URL
      &lt;input type="text" name="url" id="url" /&gt;
    &lt;/label&gt;
  &lt;/p&gt;
  &lt;p&gt;
    &lt;input type="submit" name="button" id="button" value="Submit" /&gt;
  &lt;/p&gt;
&lt;/form&gt;
</code></pre>

<p>Thanks in advance!
Troy</p>
