6 Replies Latest reply on Sep 22, 2009 4:48 PM by B Tomic

    How to disable a:button after it is clicked?

    B Tomic Newbie

      I have a "vote" button that a user should be permitted to press only once (one vote per user). The panel with the button will get rerendered and the button will disappear when the ajax response is received, but if the button is not disabled right after the initial click, the user might press it a few more times while the request is being processed. Of course, I can properly handle this event on the server side, but if I could get the button disabled, it would be quite helpful.

      I'm guessing I can put javascript somewhere to disable the button, but I have no clue where should it be placed...

      Any advice is appreciated.