Javascript and radio buttons. How do I get the vals?
<p>New to SO and javascript. I have been playing with JQuery for a couple of days now and I have a problem that I can't seem to solve. I have absolutely no js experience at all so if someone could help me out by literally spelling out what the issue is, I'd be gratful.</p>

<p>I have a single group of radio buttons that will determine if a user is an administrator or a user. I probably have my html messed up also but what I need is the current ticked value so I can save it to a database. If the user is an administrator, the value will be 1 and if he is a user, the val will be 0.</p>

<p>Here is my html:</p>

<pre><code>&lt;tr&gt;
&lt;td class="admMarker"&gt;&lt;label for="admEmpIsAdmin"&gt;Admin&lt;/label&gt;&amp;nbsp;&lt;input type="radio" id="admEmpIsAdmin" name="status" value="1" checked="checked" class="admChkbx"&gt;&lt;/td&gt;
&lt;td class="admMarker"&gt;&lt;label for="admEmpIsUser"&gt;User&lt;/label&gt;&amp;nbsp;&lt;input type="radio" id="admEmpIsUser" name="status" value="0" class="admChkbx"&gt;&lt;/td&gt;
&lt;/tr&gt;
</code></pre>

<p>Here is the javascript:</p>

<pre><code>var admEmpIsAdmin = $("input#admEmpIsAdmin").val();
</code></pre>

<p>Can someone please tell me what I am doing wrong here? This code outputs the POST vals but I would also like to know if anyone has any suggestion for me on how to display the current status from the values when they come out of the database.</p>

<p>Thanks!</p>
