You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Shubha <sh...@indussoft.com> on 2003/11/19 11:01:23 UTC

Displaying status messages on the browser while action is executed...

Hi,

I need to display a progressing status message during the time it takes to
execute an action, after a button click, and return to the form with the
appropriate data. So essentially it involves displaying a status message in
the browser as soon as the button is clicked. The message continues to be
displayed till the form is loaded afresh.

Could somebody please help me with that?

Thanks and regards,
Shubha.

Re: Displaying a dialogue box with Struts... [OT]

Posted by Guido GarcĂ­a Bernardo <gg...@itdeusto.com>.
This is not really Struts related...

You can do it with JavaScript (IE only)
    var result = showModalDialog( 
'dialog.jsp','','dialogHeight:10;status:no;');

And in the 'dialog.jsp' use the returnValue:
    <input type="button" value="Ok" onClick="self.returnValue='Ok'; 
self.close();">
    <input type="button" value="Cancel" 
onClick="self.returnValue='Cancel'; self.close();">

I think there is not other way with javascript (all the things I tried 
were easily bypassed by the usr)...
May be a 'server' based solution with Java, to be sure that the user has 
choosed an option?
Regards.

Zakaria khabot wrote:

>Hi!!
>How to display a dialog box using struts.
>The dialog box will contain two button (Ok and Cancel).
>Thanks...
>  
>

---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Displaying a dialogue box with Struts...

Posted by Zakaria khabot <z....@ced.mfie.gov.ma>.
Hi!!
How to display a dialog box using struts.
The dialog box will contain two button (Ok and Cancel).
Thanks...


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


RE: Displaying status messages on the browser while action is executed...

Posted by Andrew Hill <an...@gridnode.com>.
I used a simple trick to achieve this in an app I was working on, where the
submission went through a JavaScript method that would end by calling
form.submit(). Just before doing this it would change the css style on a
hidden section of the page to reveal the "please wait" message. It would
also hide the section containing the form contents and the submit button.
This gives quite nice feedback to the user making the app feel more
responsive, as the screen changes on the instance they click the button
(even though the next page doesnt come up for a couple of seconds).
There are of course several drawbacks to this method:
* It needs JavaScript (and has potential compatibility issues with older
browsers)
* If the user clicks stop the message remains there - they will have to
reload the page to be able to use it again.

-----Original Message-----
From: Shubha [mailto:shubha.srivastav@indussoft.com]
Sent: Wednesday, 19 November 2003 18:01
To: Struts Users Digest Mailing List
Subject: Displaying status messages on the browser while action is
executed...


Hi,

I need to display a progressing status message during the time it takes to
execute an action, after a button click, and return to the form with the
appropriate data. So essentially it involves displaying a status message in
the browser as soon as the button is clicked. The message continues to be
displayed till the form is loaded afresh.

Could somebody please help me with that?

Thanks and regards,
Shubha.


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org