title: Javascript functions not working / giving errors in my iFrame based app on Facebook!
body: <p>I have a iFrame based app on Facebook which does what its supposed to. Its PHP-based. However, as soon as I put some Javascript function, it stops working at all!</p>
  
  <p>What I am initially trying to do is to see if I have authorization for the user. If I dont have it, I send the user to the authorization page of facebook. Here's the code:</p>
  
  <pre><code>&lt;script&gt;
      function submitMappingForm() //for mapping 
      { 
          // declare a new FBJS AJAX object
          //var ajax = new Ajax(); 
          //ajax.responseType = Ajax.FBML;
  
          // define a callback to handle the response from the server
          //ajax.ondone = function(data) 
          //{ 
              //document.getElementById('stat').setInnerFBML(data);
          //}
  
          // let the user know we're sending the data 
          //document.getElementById('stat').setInnerXHTML('Submitting your information, please wait...');
  
          // collect field values
          var queryParams = { 'uname' : document.getElementById('uname').getValue(), 'upass' : document.getElementById('upass').getValue(), 'user_id' : document.getElementById('userID').getValue() };
          ajax.post('http://abcd.com/efg.php', queryParams);
          return true;
      }
  &lt;/script&gt;Welcome!&lt;script&gt; top.location.href='http://www.facebook.com/dialog/oauth?client_id=123456789&amp;redirect_uri=http%3A%2F%2Fapps.facebook.com%2Fsomeapp%2F'&lt;/script&gt;
  </code></pre>
  
  <p>However, I am getting an error with this script in firefox which is:</p>
  
  <pre><code>Error: document.getElementById("uname").getValue is not a function
  Source File: &lt;some page&gt;
  Line: 19
  </code></pre>
  
  <p>Can anyone kindly let me know what I am doing wrong here ?</p>
  
  <p>Thanks.</p>
  
  <p>-
  ahsan</p>