Comparing input fields using JQuery
<p>I currently have an input form.  There are two entries for each input class as follows:</p>

<pre><code>&lt;form&gt;
    &lt;input type="text" name="firstname_a" class="firstname" disabled="disabled" /&gt;
    &lt;input type="text" name="firstname_b" class="firstname" /&gt;
    &lt;input type="text" name="surname_a" class="surname" disabled="disabled" /&gt;
    &lt;input type="text" name="surname_b" class="surname" /&gt;
    &lt;input type="submit" value="submit" /&gt;
&lt;/form&gt;
</code></pre>

<p>On submission I want JQuery to check whether or not value a matches value b (value a has been entered by the end user, value b has been entered by a outworker working for a vetting company).  The form could have upto 470 input fields, these are stored in a database dependant upon the type of vetting being carried out.  I don't, therefore, want to have to type out 470 times!:</p>

<pre><code>if($('input["name=firstname_a"]').val() == $('input["name=firstname_a"]').val())
{
  // do something
}
else
{
  // do something else
}
</code></pre>

<p>Rather I would like to find a dynamic way to do this, possibly using the serializeArray() function, but I'm struggling!  All or any help would be greatly appreciated.</p>
