getElementById not playing nice with Radio Buttons
<p>I am guessing getElementById doesn't work with radio buttons when you want to get the value of it or to find out if it is checked? I say this because I did this:</p>

<pre><code>&lt;input id="radio1" type="radio" name="group1" value="h264" checked="checked" /&gt;
&lt;input id="radio2" type="radio" name="group1" value="flv" /&gt;
</code></pre>

<p>To get the value of the selected one I did this:</p>

<pre><code>function getRadioValue() {

    if(document.getElementById('radio1').value=='h264'){
     return 'h264';
    }
    else{
     return 'flv';
    }

}
</code></pre>

<p>However, firebug keeps telling me:</p>

<pre><code>document.getElementById("radio1") is null
[Break on this error] if(document.getElementById('radio1').checked==true){
</code></pre>

<p>What am I doing wrong?</p>

<p>Thanks all</p>
