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 Ashish (Some thing like the webspher5.0 web admin console, where it brings up a image when the user clicks button) = A$HI$H __ Do you Yahoo!? Yahoo! SiteBuilder - Free web site building tool. Try it! http://webhosting.yahoo.com/ps/sb/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: stop user from clicking the submit button twice
Havent used it yet myself so dont have any code to show, but struts provides a token based mechanism which can be used to detect when the same page has been submitted twice and thus take appropriate action (such as showing an error message). Have a look under 'tokens' in the struts documentation, and the archive and you should find that which you seek. hth Andrew -Original Message- From: Ashish Kulkarni [mailto:[EMAIL PROTECTED] Sent: Friday, 30 January 2004 06:30 To: [EMAIL PROTECTED] 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 Ashish (Some thing like the webspher5.0 web admin console, where it brings up a image when the user clicks button) = A$HI$H __ Do you Yahoo!? Yahoo! SiteBuilder - Free web site building tool. Try it! http://webhosting.yahoo.com/ps/sb/ - 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]
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]
Re: stop user from clicking the submit button twice
Or use the Struts Workflow extension... Sean On Fri, 2004-01-30 at 10:26, Simon McCaughey wrote: > 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] -- Dr. Sean Radford, MBBS, MSc [EMAIL PROTECTED] http://bladesys.demon.co.uk/ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
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]
RE: stop user from clicking the submit button twice
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]
RE: stop user from clicking the submit button twice
EnterInfoAction -- saveToken(request); enterInfo.jsp - nothing required - the 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]
RE: stop user from clicking the submit button twice
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: var buttonsEnabled = true; function disableButtons() { buttonsEnabled = false; } function enableButtons() { buttonsEnabled = true; } function checkButtonValid() { if(buttonsEnabled) {disableButtons();return true;} else {return false;} } 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 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]
RE: stop user from clicking the submit button twice
Here's a bit of JS to disable all the buttons etc on a form function disablesubmit (forma) { for (var frm = 0; frm < document.forms.length; frm++) { for (var i = 0; i < document.forms[frm].elements.length; i++) { thisform = document.forms[frm]; thiselement = document.forms[frm].elements[i]; if (document.forms[frm].elements[i].type.toLowerCase() == 'button' || document.forms[frm].elements[i].type.toLowerCase() == 'submit' || document.forms[frm].elements[i].type.toLowerCase() == 'image'){ document.forms[frm].elements[i].disabled = true; } } } return; } > -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] > ** Axios Email Confidentiality Footer Privileged/Confidential Information may be contained in this message. If you are not the addressee indicated in this message (or responsible for delivery of the message to such person), you may not copy or deliver this message to anyone. In such case, you should destroy this message, and notify us immediately. If you or your employer does not consent to Internet email messages of this kind, please advise us immediately. Opinions, conclusions and other information expressed in this message are not given or endorsed by my Company or employer unless otherwise indicated by an authorised representative independent of this message. WARNING: While Axios Systems Ltd takes steps to prevent computer viruses from being transmitted via electronic mail attachments we cannot guarantee that attachments do not contain computer virus code. You are therefore strongly advised to undertake anti virus checks prior to accessing the attachment to this electronic mail. Axios Systems Ltd grants no warranties regarding performance use or quality of any attachment and undertakes no liability for loss or damage howsoever caused. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: stop user from clicking the submit button twice
You may also want to check out http://www.javaworld.com/javatips/jw-javatip136_p.html "Summary Struts, from the Apache Jakarta Project, implements the Synchronizer Token pattern to prevent duplicate form submission. Applying this pattern, you can detect this situation and follow an alternate course of action when it happens. But which alternate action? In most cases, the best solution would be to simply recover the first submit's result. This tip suggests a simple strategy to achieve that goal. (750 words; March 14, 2003)" HTH Dan - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]