title: calling javascript function using struts 2 hyperlink tag?
body: <p>i have below code snippet in my jsp but it does not call addCustomer function.</p>
  
  <pre><code> &lt;s:a href="javascript:addCustomer()"&gt;Add Customer&lt;/s:a&gt;
  </code></pre>
  
  <p>Am i missing something in using s:a tag?</p>
  
  <p>The html code generated coressponding to s:a tag is</p>
  
  <pre><code>&lt;a href="javascript:addCustomer();" tabindex="-1"&gt;Add Customer&lt;/a&gt;
  </code></pre>
  
  <p>Though when i use below code snippet javascript function gets executed. I am not getting whats the issue in using s:a tag?</p>
  
  <pre><code>&lt;a href="#" onclick = "addCustomer();"&gt;Add Custome&lt;/a&gt;
  </code></pre>