title: Sending post data using html a tag
body: <p>I would like to send POST data using an html  tag.
  I know that there is no way doing this unless i script.
  However i tried , but couldn't get it to work.</p>
  
  <pre><code>&lt;a class="test" onClick="assign()"&gt;&lt;img src='&lt;?php echo $accounts[$i]['Account']['image']; ?&gt;' /&gt; &lt;?php echo $accounts[$i]['Account']['screen_name']; ?&gt;&lt;/a&gt;    
  </code></pre>
  
  <p>I tried using this:</p>
  
  <pre><code>function assign(){ 
              $.post("/Accounts/index", 
              { data: "test" 
  
  
              });
          }    
  </code></pre>
  
  <p>and i also tried this :</p>
  
  <pre><code>$(document).ready(function(){
  
              $(".test").click(function(){
  
                  $.post("/accounts/index", 
                  { data: "test"
  
                  });
              });
  
          });
  </code></pre>