users@woodstock.java.net

RE: Submit and disable a button

From: Stefan Bley <stefan.bley_at_saxsys.de>
Date: Fri, 10 Oct 2008 01:03:55 -0700 (PDT)

Hi Steffen

In your example you do not disable the button. For me the question is how to
disable the button and at the same time submit the form.

Any idea?!


IOLAUS wrote:
>
> Hi,
>
> i made a mistake.
>
> .getElementById("form1:btnLogin").click() = true; is wrong!
>
> .getElementById("form1:btnLogin").click() without =true is correct.
>
>
> Thx
>
>
> -----Original Message-----
> From: Steffen [mailto:iolaus_at_gmx.ch]
> Sent: Donnerstag, 2. Oktober 2008 15:11
> To: users_at_woodstock.dev.java.net
> Subject: RE: Submit and disable a button
>
> Sorry for my little answer. So, I have a false return statement in the
> onClick method, in a ui-component.
>
>
> // js script example
>
> <webuijsf:script>
> function doSomething() {
> var userInput = confirm("got it?");
>
> if ( userInput ) {
> document.getElementById("form1:btnLogin").click() = true;
> }
> }
> </webuijsf:script>
>
>
> // Button and textfield
>
> <webuijsf:form id="form1">
>
> <webuijsf:textField binding="#{Page1.textField1}" id="textField1"/>
>
> <webuijsf:button actionExpression="#{Page1.btnLogin_action}"
> id="btnLogin"
> onClick="doSomething(); return false;"/>
>
> </webuijsf:form>
>
>
> // action handler for the btnButton
>
> public String btnLogin_action() {
> textField1.setText("Hello Steve, it works!");
> return null;
> }
>
> I hope it is helpful..
>
> Greetings
>

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