How to check if an input is a radio - javascript
<p>How can I check if a field is a radio button?</p>

<p>I tried <code>if(document.FORMNAME.FIELDNAME.type =='radio')</code> but document.FORMNAME.FIELDNAME.type is returning undefined.</p>

<p>The html on the page is 
<code>&lt;input name="FIELDNAME" type="radio" value="1" &gt;
&lt;input name="FIELDNAME" type="radio" value="0" &gt;</code></p>

<p>Unless I am taking the whole approach wrong. My goal is to get the value of an input field, but sometimes that field is a radio button and sometimes its a hidden or text field.</p>

<p>Thanks.</p>
