title: call javascript function from anchor html tag
body: <p>I need to display message when the user clicks link</p>
  
  <p>How can I implement something where once the user click the hyper link on Page1, a "processing..." message and then as soon as Page2 is ready it forwards to Page2?</p>
  
  <p>It is working for button click which I earlier posted got response implemented successfully.Thanks.</p>
  
  <p><a href="https://stackoverflow.com/questions/40721522/hidden-dom-element-containing-the-message-and-to-make-it-visible/40721631?noredirect=1#comment68671445_40721631">Hidden DOM element containing the message and to make it visible</a></p>
  
  <p>Same thing I tried to implement for the below HTML code which is using Servlet not sure how to implement</p>
  
  <pre><code>        &lt;a href="&lt;%=request.getContextPath()%&gt;/servlet/VisibilityController?searchType=workSearchDetails&amp;workNo=&lt;%=installAtLocListBean.getWorkNumber()%&gt;&amp;ID=&lt;%= firstLocationNumber %&gt;&amp;sitePosition=&lt;%=pagePosition%&gt;"&gt;&lt;%=installAtLocListBean.getWorkNumber()%&gt;onclick="MyFunction();return true;"&lt;/a&gt;&lt;/td&gt;
  </code></pre>
  
  <p>Can any body help me is it possible to do as button click any examples please
  Thanks in advance</p>