users@woodstock.java.net

RE: Submit and disable a button

From: Stefan Bley <stefan.bley_at_saxsys.de>
Date: Thu, 2 Oct 2008 05:09:19 -0700 (PDT)

Could you please show this in context?
Where did you put this statement and what is this supposed to do?

Like that?

<!-- code -->
<webuijsf:script>
      function login() {
          document.getElementById("form1:btnLogin").setProps({disabled:
true});
          document.getElementById("form1:btnLogin").click() = true;
      }
</webuijsf:script>
<webuijsf:button actionExpression="#{login$Login.handleBtnLogin}"
id="btnLogin" text="Login" onClick="login()"/>
<!-- end of code -->

Stevy


IOLAUS wrote:
>
> Hello List,
>
> I had the same trouble and I've fixed it with JavaSctipt. Like
> "document.getElementById("form1:yourButton").click() = true;".
>
>
> Greets
>
> The reason is to tell the user "Your request is processing, please wait
> and
> do not click again until the request is completed." This is very common,
> e.g. see Glassfish Admin Console.
>
> The problem is: If you use onClick() and set the button disabled, the form
> is not submitted.
> How can one have both, disable the button and submit the form?
>
> Stevy
>
>

-- 
View this message in context: http://www.nabble.com/Submit-and-disable-a-button-tp16322463p19777999.html
Sent from the Project Woodstock - Users mailing list archive at Nabble.com.