How to stop in strut2 <sx:submit onClick="return myfunction(a, b)" /> from submitting form when function returns false
===

    <%@ taglib prefix="s" uri="/struts-tags" %>
    <%@ taglib prefix="sx" uri="/struts-dojo-tags" %>


     <html>
     <head>
      <sx:head cache="true" />
    <script>
       myfunction(a, b)
      {
          if ( a> b) 
          return true;
          else
          return false;   


      }
     </script>

    </head>

....

     <s:form  action="saveXXXX"  >

      .... fields....                    

      <s:submit onclick="return myfunction(a, b);" />  //THIS ONE WORKS
      <sx:submit onclick="return myfunction(a, b);" />  
     //how to stop form submittal if fucntion returns false.    
    
      </s:form> 

The form works using     s:submit .. but now that I'm trying to ajaxfy it with     sx:submit ... 

Im not able to stop form submittal if function returns false. WHY?

How can it be done?