title: Pulling form data with Javascript (with a bit of ReST)
body: <p>I know this has probably been asked a dozen times, but I am kind of stumped.</p>
  
  <p>I have a form:</p>
  
  <pre><code>&lt;form id="login"&gt;
  
  &lt;label&gt;Email&lt;/label&gt;
  &lt;input id="email"/&gt;
  
  
  &lt;label&gt;First Name&lt;/label&gt;
  &lt;input id="fName"/&gt;
  
  
  &lt;label&gt;Last Name&lt;/label&gt;
  &lt;input id="lName"/&gt;
  
  
  &lt;label&gt;Phone #&lt;/label&gt;
  &lt;input id="phone"/&gt;
  </code></pre>
  
  <p>And the ReST call I am using is:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  
  $.ajax({
      url: 'http://example.com/',
      type: 'PUT',
      data: 'ID=1&amp;fname=datagoeshere&amp;lname=datagoeshere&amp;email=datagoeshere', 
      success: function() { alert('PUT completed'); }
  });
  
  
  &lt;/script&gt;
  </code></pre>
  
  <p>I guess the part I am stuck on is how to pull out just fname,lname and email and stick the information that gets entered into the form into the ReST call. The form is also posting to another form.</p>