title: populating an email "to, cc" and body using javascript and html
body: <p>Everything seems to work fine except when i try to populate <code>to</code> box...</p>
  
  <p>my code:</p>
  
  <pre><code>Email: &lt;input type="text" id="myTex"&gt;
  
  &lt;textarea id="myText"&gt;
     lorsem ipsum
  &lt;/textarea&gt;
  &lt;button onclick="sendMail(); return false"&gt;Send&lt;/button&gt;
  
  &lt;script&gt;
  function sendMail() {
      var link = "&amp;mailto=" + escape(document.getElementById('myTex').value)
               + "?cc=myCCaddress@example.com"
               + "&amp;subject=" + escape("Welcome New agent! ")
               + "&amp;body=" + escape(document.getElementById('myText').value)
      ;
  
      window.location.href = link;
  }&lt;/script&gt;
  </code></pre>
  
  <p>I have a problem with my Email input, it's breaking everything.. perhaps my syntax is wrong? I've tried a few different things but to no avail.. Hopefully it's something simple and i just need another set of eyes. As usual.. any help would be greatly appreciated. thank you.</p>