title: How to send html code with XMLhttpRequest
body: <p>I use this code to send information to a NODEjs server :</p>
  
  <pre><code>var obj=new XMLHttpRequest();
  vat txt2send = "test";
  obj.open("GET","http://localhost:1234" + "?variable=" + txt2send, true);
  obj.send(null);
  </code></pre>
  
  <p>But now i would like to send an html code. Example : </p>
  
  <pre><code>var txt2send = '&lt;div class="generate_div_last"&gt;
              &lt;h3&gt;Sentences:&lt;/h3&gt;
              &lt;form id="sent" name="sent" method="post" action="http://www.ipsum-generator.com/loremipsum/sentences"&gt;
                  &lt;input type="text" id="numsent" name="num" size="2" maxlength="3" value="50" /&gt;
                  &lt;input type="submit" id="poslji3" class="poslji" name="poslji" value="Generate!" /&gt;
                  &lt;h4&gt;Options:&lt;/h4&gt;
                  &lt;input type="checkbox" id="p_tags_sent" name="p_tags" /&gt;
                      &lt;span class="tiny2"&gt;
                          &lt;label for="p_tags_sent"&gt;Add paragraph tags (&amp;lt;p&amp;gt;)&lt;/label&gt;
                      &lt;/span&gt;&lt;br /&gt;
                  &lt;input type="checkbox" id="i_tags_sent" name="i_tags" /&gt;
                      &lt;span class="tiny2"&gt;
                          &lt;label for="i_tags_sent"&gt;Add &lt;i&gt;italic&lt;/i&gt; tags (&amp;lt;i&amp;gt;)&lt;/label&gt;
                      &lt;/span&gt;&lt;br /&gt;
                  &lt;input type="checkbox" id="b_tags_sent" name="b_tags" /&gt;
                      &lt;span class="tiny2"&gt;
                          &lt;label for="b_tags_sent"&gt;Add &lt;b&gt;bold&lt;/b&gt; tags (&amp;lt;b&amp;gt;)&lt;/label&gt;
                      &lt;/span&gt;&lt;br /&gt;
              &lt;/form&gt;
              &lt;div class="small"&gt;This option will generate the specified number of sentences of lorem ipsum.&lt;/div&gt;
          &lt;/div&gt;';
  </code></pre>
  
  <p>How can i achieve that ? Now of course i have a malformed URL.</p>