Javascript function is not getting called onclick of hx:commandExButton

Posted by Sunny Mate on Stack Overflow See other posts from Stack Overflow or by Sunny Mate
Published on 2010-04-01T11:48:14Z Indexed on 2010/04/01 13:33 UTC
Read the original article Hit count: 337

Filed under:
|

When I click on the hx:commandExButton the Javascript function should get called, but it is not getting called. The Javascript function is as follows:

function test() {
    alert('ss');
    return  "true";
}

The hx:commandButton is as follows:

<hx:commandExButton
    type="submit"
    value="Search"
    styleClass="action2" id="searchButton"
    onclick="return test();"
    action="#{pc_WorkInProgressUserGrid.doSearchButtonAction}"
    immediate="true">
</hx:commandExButton>

Any suggestion would be helpful.

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about jsf