1 Reply Latest reply on Jul 22, 2007 10:12 AM by inv3r53 d

    oncomplete callback fails with a4j:commandButton

    Eric Jung Newbie

      Hi,

      I have a very simple a4j:commandButton with an oncomplete callback that never gets called. All the ajax code works except this callback.

      <a4j:commandButton id="searchBtn1" value="Search" action="#{MyBean.search}"
      oncomplete="alert('hello world')"/>


      the rendered code is:

      <input id="f1:searchBtn1" name="f1:searchBtn1" onclick="A4J.AJAX.Submit('_viewRoot','f1',event,{'parameters':{'f1:searchBtn1':'f1:searchBtn1'},'actionUrl':'/TestApp/Search.faces','oncomplete':function(request,event,data){alert('hello world');}});return false;" value="Search" type="button" />


      There are no errors (javascript or otherwise) reported on the page. The alert() just never gets called. Anyone know what I'm doing wrong?

      Thanks in advance,
      grimholtz