We use:
1) Struts token to prevent reload (F5) problems, 
2) page redirection in a "in process page" for long transactions
(usually with JMS)
3) javascript to prevent user doubleclicking buttons.

We use Xkins and our buttons are images generated by xkins, and have
taglibs to generate this buttons and all is done by these taglibs, but
the javascript concept is as follows:

<script>
var buttonsEnabled = true;
function disableButtons() { buttonsEnabled = false; }
function enableButtons() { buttonsEnabled = true; }
function checkButtonValid() {
        if(buttonsEnabled) {disableButtons();return true;} else {return
false;}
}
</script>
<input type="submit" onclick="return checkButtonValid()"/>

Cheers.
Guillermo


-----Original Message-----
From: Ben Anderson [mailto:[EMAIL PROTECTED] 
Sent: Viernes, 30 de Enero de 2004 09:49 a.m.
To: [EMAIL PROTECTED]
Subject: RE: stop user from clicking the submit button twice


EnterInfoAction
----------------------
saveToken(request);

enterInfo.jsp
---------------------
nothing required - the <html:form tag places an <input type="hidden" tag
for 
you

ProcessInfoAction
-------------------------
if ( !isTokenValid(request, true) ) {
         //incorrect token
}

I'm pretty sure this is how it works, but it's been a while, so I may
have 
something mixed up.
-Ben


>From: "Zsolt Koppany" <[EMAIL PROTECTED]>
>Reply-To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
>Subject: RE: stop user from clicking the submit button twice
>Date: Fri, 30 Jan 2004 13:23:34 +0100
>
>Hi Steve,
>
>it sound very interesting. Can you provide some info how to use these 
>"struts token functions"?
>
>Zsolt
>
> > -----Original Message-----
> > From: Hunt, Steve [mailto:[EMAIL PROTECTED]
> > Sent: Friday, January 30, 2004 11:59 AM
> > To: 'Struts Users Mailing List'
> > Subject: RE: stop user from clicking the submit button twice
> >
> >
> > U can also use the struts token functions to detect when a page has 
> > been submitted twice in the actionclass and not start the processing

> > twice.
> >
> > -----Original Message-----
> > From: Simon McCaughey [mailto:[EMAIL PROTECTED]
> > Sent: 30 January 2004 10:26
> > To: Struts Users Mailing List
> > Subject: Re: stop user from clicking the submit button twice
> >
> >
> > From: "Ashish Kulkarni" <[EMAIL PROTECTED]>
> > Sent: Thursday, January 29, 2004 10:30 PM
> > Subject: stop user from clicking the submit button twice
> > > Hi
> > > I have a process which takes about 30 seconds, i want
> > > to show some kind of image or disable the submit
> > > button untill the process is complete and tell user
> > > that the process is running
> > > How can i do it, i m using struts1.1
> > > any code example or article will greatly help
> > >
> >
> > You could use some simple JavaScript to disable the button once its 
> > been clicked, or a simple JavaScript function to count the number of

> > clicks
>and
> > increment, if count!=1  then pop up an OK dialog saying "page 
> > processing
>-
> > please wait".
> >
> > If you want to stay away from JS, you could set up your form submit 
> > to redirect to a "processing please wait" type page, and then do the

> > actual processing as a submission of that page. Should be fairly 
> > simple.
> >
> > HTH
> >
> > S.
> >
> >
> >
> > --------------------------------------------------------------------
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> > =======================================================
> > This message contains information that may be privileged or 
> > confidential and is the property of the Cap Gemini Ernst & Young 
> > Group. It is intended only for the person to whom it is addressed. 
> > If you are not the intended recipient, you are not authorised to 
> > read, print, retain, copy, disseminate, distribute, or use this 
> > message or any part thereof. If you receive this message in error, 
> > please notify the sender immediately and delete all copies of this 
> > message. =======================================================
> >
> >
> > --------------------------------------------------------------------
> > -
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>

_________________________________________________________________
Check out the coupons and bargains on MSN Offers! 
http://shopping.msn.com/softcontent/softcontent.aspx?scmId=1418


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to