title: Cannot read property 'length' of undefined
body: <p>I've been looking at the other posts on this error but can't seem to figure it out in this situation. I'm trying to save to localstorage, but I get this error and it says that the "radio" variable is undefined, but it doesn't seem to be. I'm using JQMobile as well. Here's the fiddle:
  <a href="http://jsfiddle.net/KpbLD/" rel="nofollow">http://jsfiddle.net/KpbLD/</a> 
  Line 28 seems to be the problem.</p>
  
  <p>Here's the function:</p>
  
  <pre><code>var getSelectedRadio = function(){
          var radios = document.forms[0].acoustic;
          for(var i=0, j=radios.length; i&lt;j; i++){
              if(radios[i].checked) {
              console.log(acousticValue);
                  acousticValue = radios[i].value;
  
              }
          }
          return acousticValue;
  
  };
  </code></pre>