title: How make post request and get response back using getjson method?
body: <p>I want to post textarea data to a php form and get its response back to another textarea. could you guys tell me how this can be done? I tried following but it doesn't work! </p>
  
  <pre><code>$.post(url, dataToBeSent, function(data, textStatus) {
  
     url="./doit.php";
     var dataToBeSent = $("myform").serialize();
  
  var siteContents2 = data.contents;  
  document.myform2.outputtext2.value = siteContents2 ;
  
  }, "json");
  </code></pre>
  
  <p>forms:</p>
  
  <pre><code>&lt;form id="myform" name="myform" action="./ok1.php?Id=&amp;title=" method="post"&gt;
  &lt;td&gt;&lt;textarea rows="7" cols="15" name="outputtext" style="width: 99%;"&gt;&lt;/textarea&gt;&lt;/td&gt;
  
  &lt;/form&gt;
  
  &lt;form id="myform2" name="myform2" action="./ok2.php?Id=&amp;title=" method="post"&gt;
  &lt;td&gt;&lt;textarea rows="7" cols="15" name="outputtext2" style="width: 99%;"&gt;&lt;/textarea&gt;&lt;/td&gt;
  
  &lt;/form&gt;
  </code></pre>
  
  <p>php get data passed beg getjson:</p>
  
  <pre><code>$passed3 = $_post['dataToBeSent'];
  echo $passed3;
  </code></pre>