title: passing value from one page to another with javascript
body: <p>How can I pass the value of textarea to a new page according to the <code>groupwall</code> method?<br>
  Here I just redirect the page. I want to make status update according to their semester.<br>
  Here is my code. Give me some code sample or suggest if this is not the right way to do that.  </p>
  
  <pre><code>&lt;form action=""   method="get"&gt;
      &lt;textarea name="status" id="wall" cols="50" rows="2"&gt;                
      &lt;/textarea&gt;
  
      &lt;input name="submit" type="submit" value="share" onclick="groupwall();"/&gt;
  &lt;/form&gt;
  
  &lt;script type="text/javascript"&gt;
      function groupwall(){
          var semster=document.getElementById('txtsamp').value;
          if(semster == "4-1"){
              window.location ='4-1hpage.php';
              //header("location: member-index.php");
          }
          else if(semster =="3-1"){
              window.location ='3-1hpage.php';
          }
          else if(semster == "2-1"){
              window.location ='2-1hpage.php';
          }
          else {
              window.location ='1-1hpage.php';
          }
      }
  &lt;/script&gt;
  </code></pre>