5 Replies Latest reply on Apr 10, 2007 11:00 AM by Sergey Smirnov

    action method not called when using onclick in a4j:commandBu

    shooali Newbie

      Helllo,

      When I add a call to a javascript method using the onclick attribute of the a4j:commandButton, the action method of the bean is not called. When I check the source it looks ok:

      <input type="submit" id="policy_editing_form:recalc_rule_scope_btn" name="policy_editing_form:recalc_rule_scope_btn" onclick="toggleProgressIconOn();A4J.AJAX.Submit('_viewRoot','policy_editing_form',event,{'parameters':{'policy_editing_form:recalc_rule_scope_btn':'policy_editing_form:recalc_rule_scope_btn'},'actionUrl':'/web/PolicyEditingPage.jsf','oncomplete':function(request,event,data){toggleProgressIconOff()}});return false;" value="Calculate Policy Coverage">
      </input>
      


      I return nothing in the toggleProgressIconOn function.

      is it supposed to be like this? I just want to change the cursor style while the ajax request is processed so I use onclick and oncomplete respectively.

      any idea?

      thanks,