title: Mailto using Javascript?
body: <p>I'm new to javascript and the following code isn't working:</p>
  
  <pre><code>&lt;script&gt;
  function sendMail()
  {
      var yourMessage = document.getElementById("message").value
      var subject = document.getElementById("selectList").value
      var mail="mailto:chrisgreg23@googlemail.com?subject="+subject+"&amp;body="+yourMessage;
  
      window = window.open(mail, 'emailWindow')
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>I just want a mail client window to open with the subject and body already done.</p>
  
  <p>Help?</p>
  
  <p>EDIT:</p>
  
  <p>I've also tried this:</p>
  
  <pre><code>&lt;script&gt;
  function sendMail()
  {
      var yourMessage = document.getElementById("message").value
      var subject = document.getElementById("selectList").value
      var mail="mailto:chrisgreg23@googlemail.com?subject="+subject+"&amp;body="+yourMessage;
  
      $(this).attr('href', mail);
  }
  &lt;/script&gt;
  </code></pre>
  
  <p>Ive got that now, still not working.</p>