title: javascript injection on a form to send a post request
body: <p>well as title suggests, how could I do a <code>javascript injection</code> on a <code>form</code> to send a <code>post request</code>.</p>
  
  <p>I'm pretty new to <code>JavaScript injections</code>. I've done different type of injections, but when it comes to <code>form</code> it seems google is out of options (or rather I don't know how to do the search)</p>
  
  <p>supposedly this is the form:;</p>
  
  <pre><code>&lt;form action="/" method="post"&gt;
  &lt;h3&gt;enter name to be echoed:&lt;/h3&gt;
  &lt;input id="myname" name="myname" type="text" value="nafas"&gt;
  &lt;input type="image" src="/img/funny.png" alt="Echo Name" onclick="progress(true)"&gt;
  &lt;scripttype="text/javascript"&gt;document.write('&lt;a href="#" onclick="document.getElementById(\'myname\').value=\'\';return false"&gt;Clean&lt;/'+'a&gt;')&lt;/script&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>method <code>progress</code> is:</p>
  
  <pre><code>function progress(s){
      var o=document.getElementById("myname");
      if(o){
          if(s){
              o.style.backgroundImage="url(/img/progress.gif)"
              o.style.backgroundPosition="right center";
              o.style.backgroundRepeat="no-repeat";
          }else{
              o.style.backgroundImage="none";
          }
      }
  }
  </code></pre>