Getting new form input values with event - JQuery
<p>I currently have a registration form which when clicked from a link opens up in a jQuery dialog modal box. I have used .delegate when the form is submitted.</p>

<p>The JS</p>

<pre><code>$('.regForm').delegate("#submit" , "click" , function(event) {

    event.preventDefault(); 

    var form_data = {
        username: $('#regUsername').val(),
        password: $('#regPassword').val(),
        confirm_password: $('#regConfPass').val(),
        email: $('#regEmail').val(),
        confirm_email: $('#regEmailConf').val()
    };
});
</code></pre>

<p>The html</p>

<pre><code>&lt;div class="regForm"&gt;
        &lt;form action="http://adomain.com/register/jsReg" method="post" accept-charset="utf-8" &gt;
            &lt;table class="regFormTable"&gt;
                &lt;tr&gt;
                    &lt;td&gt;Username&lt;/td&gt;
                    &lt;td&gt;&lt;input class="regInput borderradius3" type="text" name="username" id="regUsername"/&gt;&lt;/td&gt;
                &lt;/tr&gt;
                    &lt;td&gt;&lt;/td&gt;
                    &lt;td&gt;&lt;input type="submit" class="button borderradius3" value="Register" id="submit"/&gt;&lt;/td&gt;
                &lt;/tr&gt;
            &lt;/table&gt;
        &lt;/form&gt;
    &lt;/div&gt;
</code></pre>

<p>The problem is that when I close and reopen the dialog box the forms input values are the same as the first ones.I think it is looking for the first set of id's which match and then getting the values, I may be wrong. I have looked at trying to get the values using event.target but I'm unsure of how get the values.</p>

<p>Any help on this would be much appreciated :)</p>
