You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by RudyG <rg...@gmail.com> on 2008/12/09 23:40:15 UTC

Displaying "Please Wait" message

Hello.

I have an odd problem that I can't seem to resolve. I use struts along with
JSP to call Java Servlets on the back end. Some back end calls take a little
while when used by the WEB users so I've been asked to put up a message that
tells the users to "Please Wait" so that they don't press the Submit button
multiple times. So what I ended up doing was calling a Javascript function
from within the onclick() event of the Submit button. And here are the
contents of the function:

function splashScreen()
{
	document.write("<p
style='color:black;background-color:aqua;text-align:center;margin:25% 25%
10% 25%;border: medium double black;'>Processing Data.<br>Please
Wait.</p>");
	document.forms[0].submit();
	return true;
}

However the problem is that after the document write is executed the
processing stops. All attempts of doing the submit() from Javascript also
does not work as it gives some sort of permission violation. Does anyone
have any suggestions?

Thank you in advance.
Rudy

-- 
View this message in context: http://www.nabble.com/Displaying-%22Please-Wait%22-message-tp20925275p20925275.html
Sent from the Struts - User mailing list archive at Nabble.com.


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


Re: [OT] Re: Displaying "Please Wait" message

Posted by RudyG <rg...@gmail.com>.
Huge thanks to everyone for their replies and help. I think I finally figured
out the problem with all of your help.

Here's what I think it was. Frank the line after the document.write is
definitely reached, as I tried several different ways to do the submit().
One was by passing the form object to the subroutine and the other was by
calling the submit on the form from within the onclick even text. All of
those gave me the Authorization error message which is what led me to
believe that the Struts form was the guilty party. :confused: However, with
your help I came to realize that document.write obliterates the HTML of the
page it is writing to, therefore there is no longer a form to submit, hence
the reason for the message I was getting. So huge thanks to Frank and Dave
and the others for pointing that out.
Frank another huge thanks for the code snippet, I will definitely be using
<div> since in all of my research on how other sites have done it I saw them
using the <div>. However, I wanted to make sure that I first understood why
document.write didn't work and that it in fact was the culprit. Your code
snippet will be definitely utilized.
Miguel thanks for the JQuery suggestion. I've heard of it a few times now so
I think it is time I check it out.
Just in case you guys haven't figured it out yet, I'll go ahead and confess.
I'm really a back end Java developer who has been "volunteered" to do the
front end. So for the past several months I've been wrestling with the front
end as well as the back end. However, this was the first time I got really
stuck.

Huge huge thanks to all.
Rudy


Miguel-55 wrote:
> 
> You can always use JQuery.Form (http://malsup.com/jquery/form/)
> It removes the browser dependent stuff (i think it works identically
> in almost any browser), and because it's using the jquery programming
> style, it's irrelevant if it's plain html form or an struts form, as
> long as you know the id of the form in the resulting form.
> Give it a check, use the beforeSubmit function to disable the submit
> button, and the success to reactivate it. You may also use JQuery to
> do the disable/enable stuff in the button.
> 
> Si quieres ser más positivo, pierde un electrón
> Miguel Ruiz Velasco S.
> 
> 
> 
> On Tue, Dec 9, 2008 at 18:25, Dave Newton <ne...@yahoo.com> wrote:
>> Heh. Hrmph. Works under Safari/OSX.
>>
>> Gives me the heebie jeebies.
>>
>>
>> --- On Tue, 12/9/08, Frank W. Zammetti <fz...@omnytex.com> wrote:
>>
>>> From: Frank W. Zammetti <fz...@omnytex.com>
>>> Subject: Re: [OT] Re: Displaying "Please Wait" message
>>> To: "Struts Users Mailing List" <us...@struts.apache.org>
>>> Date: Tuesday, December 9, 2008, 7:21 PM
>>> That's exactly the behavior I expected... odd that I
>>> didn't see it (IE7 and FF3.0.4 on XP).  I can buy
>>> it's browser-dependent, just odd to hear that FF3 would
>>> be different on OSX than on Windows.  Oh well, that's
>>> just *MORE* support for the idea of not using
>>> document.write() after the page has loaded :)
>>>
>>> Frank
>>> > --- On Tue, 12/9/08, Frank W. Zammetti wrote:
>>> >
>>> >> [...] I actually expected the alert() to NOT work
>>> because I figured the document.write() call was overwriting
>>> your page, which would have made sense, but it appears
>>> document.write() actually appends to the document.  I
>>> wouldn't swear to that, but that's what seems to be
>>> the case given my test.
>>> >>
>>> >
>>> > It's browser-dependent; on OSX/FF3 the form is
>>> gone after the document.write() (at least when Firebug is
>>> installed...) so I get an error.
>>> >
>>> > Dave
>>> >
>>> >
>>> >
>>> ---------------------------------------------------------------------
>>> > To unsubscribe, e-mail:
>>> user-unsubscribe@struts.apache.org
>>> > For additional commands, e-mail:
>>> user-help@struts.apache.org
>>> >
>>> >
>>> > __________ Information from ESET Smart Security,
>>> version of virus signature database 3679 (20081209)
>>> __________
>>> >
>>> > The message was checked by ESET Smart Security.
>>> >
>>> > http://www.eset.com
>>> >
>>> >
>>> >
>>> >
>>> >
>>>
>>>
>>> -- Frank W. Zammetti
>>> Author of "Practical Dojo Projects"
>>>  and "Practical DWR 2 Projects"
>>>  and "Practical JavaScript, DOM Scripting and Ajax
>>> Projects"
>>>  and "Practical Ajax Projects With Java
>>> Technology"
>>>  (For info:
>>> apress.com/book/search?searchterm=zammetti&act=search)
>>> My "look ma, I have a blog too!" blog:
>>> zammetti.com/blog
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>> For additional commands, e-mail:
>>> user-help@struts.apache.org
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Displaying-%22Please-Wait%22-message-tp20925275p20929426.html
Sent from the Struts - User mailing list archive at Nabble.com.


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


Re: [OT] Re: Displaying "Please Wait" message

Posted by Miguel <mi...@gmail.com>.
You can always use JQuery.Form (http://malsup.com/jquery/form/)
It removes the browser dependent stuff (i think it works identically
in almost any browser), and because it's using the jquery programming
style, it's irrelevant if it's plain html form or an struts form, as
long as you know the id of the form in the resulting form.
Give it a check, use the beforeSubmit function to disable the submit
button, and the success to reactivate it. You may also use JQuery to
do the disable/enable stuff in the button.

Si quieres ser más positivo, pierde un electrón
Miguel Ruiz Velasco S.



On Tue, Dec 9, 2008 at 18:25, Dave Newton <ne...@yahoo.com> wrote:
> Heh. Hrmph. Works under Safari/OSX.
>
> Gives me the heebie jeebies.
>
>
> --- On Tue, 12/9/08, Frank W. Zammetti <fz...@omnytex.com> wrote:
>
>> From: Frank W. Zammetti <fz...@omnytex.com>
>> Subject: Re: [OT] Re: Displaying "Please Wait" message
>> To: "Struts Users Mailing List" <us...@struts.apache.org>
>> Date: Tuesday, December 9, 2008, 7:21 PM
>> That's exactly the behavior I expected... odd that I
>> didn't see it (IE7 and FF3.0.4 on XP).  I can buy
>> it's browser-dependent, just odd to hear that FF3 would
>> be different on OSX than on Windows.  Oh well, that's
>> just *MORE* support for the idea of not using
>> document.write() after the page has loaded :)
>>
>> Frank
>> > --- On Tue, 12/9/08, Frank W. Zammetti wrote:
>> >
>> >> [...] I actually expected the alert() to NOT work
>> because I figured the document.write() call was overwriting
>> your page, which would have made sense, but it appears
>> document.write() actually appends to the document.  I
>> wouldn't swear to that, but that's what seems to be
>> the case given my test.
>> >>
>> >
>> > It's browser-dependent; on OSX/FF3 the form is
>> gone after the document.write() (at least when Firebug is
>> installed...) so I get an error.
>> >
>> > Dave
>> >
>> >
>> >
>> ---------------------------------------------------------------------
>> > To unsubscribe, e-mail:
>> user-unsubscribe@struts.apache.org
>> > For additional commands, e-mail:
>> user-help@struts.apache.org
>> >
>> >
>> > __________ Information from ESET Smart Security,
>> version of virus signature database 3679 (20081209)
>> __________
>> >
>> > The message was checked by ESET Smart Security.
>> >
>> > http://www.eset.com
>> >
>> >
>> >
>> >
>> >
>>
>>
>> -- Frank W. Zammetti
>> Author of "Practical Dojo Projects"
>>  and "Practical DWR 2 Projects"
>>  and "Practical JavaScript, DOM Scripting and Ajax
>> Projects"
>>  and "Practical Ajax Projects With Java
>> Technology"
>>  (For info:
>> apress.com/book/search?searchterm=zammetti&act=search)
>> My "look ma, I have a blog too!" blog:
>> zammetti.com/blog
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail:
>> user-help@struts.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

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


Re: [OT] Re: Displaying "Please Wait" message

Posted by Dave Newton <ne...@yahoo.com>.
Heh. Hrmph. Works under Safari/OSX.

Gives me the heebie jeebies.


--- On Tue, 12/9/08, Frank W. Zammetti <fz...@omnytex.com> wrote:

> From: Frank W. Zammetti <fz...@omnytex.com>
> Subject: Re: [OT] Re: Displaying "Please Wait" message
> To: "Struts Users Mailing List" <us...@struts.apache.org>
> Date: Tuesday, December 9, 2008, 7:21 PM
> That's exactly the behavior I expected... odd that I
> didn't see it (IE7 and FF3.0.4 on XP).  I can buy
> it's browser-dependent, just odd to hear that FF3 would
> be different on OSX than on Windows.  Oh well, that's
> just *MORE* support for the idea of not using
> document.write() after the page has loaded :)
> 
> Frank
> > --- On Tue, 12/9/08, Frank W. Zammetti wrote:
> >   
> >> [...] I actually expected the alert() to NOT work
> because I figured the document.write() call was overwriting
> your page, which would have made sense, but it appears
> document.write() actually appends to the document.  I
> wouldn't swear to that, but that's what seems to be
> the case given my test.
> >>     
> > 
> > It's browser-dependent; on OSX/FF3 the form is
> gone after the document.write() (at least when Firebug is
> installed...) so I get an error.
> > 
> > Dave
> > 
> > 
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> user-unsubscribe@struts.apache.org
> > For additional commands, e-mail:
> user-help@struts.apache.org
> > 
> > 
> > __________ Information from ESET Smart Security,
> version of virus signature database 3679 (20081209)
> __________
> > 
> > The message was checked by ESET Smart Security.
> > 
> > http://www.eset.com
> > 
> > 
> > 
> > 
> >   
> 
> 
> -- Frank W. Zammetti
> Author of "Practical Dojo Projects"
>  and "Practical DWR 2 Projects"
>  and "Practical JavaScript, DOM Scripting and Ajax
> Projects"
>  and "Practical Ajax Projects With Java
> Technology"
>  (For info:
> apress.com/book/search?searchterm=zammetti&act=search)
> My "look ma, I have a blog too!" blog:
> zammetti.com/blog
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail:
> user-help@struts.apache.org

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


Re: [OT] Re: Displaying "Please Wait" message

Posted by "Frank W. Zammetti" <fz...@omnytex.com>.
That's exactly the behavior I expected... odd that I didn't see it (IE7 
and FF3.0.4 on XP).  I can buy it's browser-dependent, just odd to hear 
that FF3 would be different on OSX than on Windows.  Oh well, that's 
just *MORE* support for the idea of not using document.write() after the 
page has loaded :)

Frank
> --- On Tue, 12/9/08, Frank W. Zammetti wrote:
>   
>> [...] I actually expected the alert() to NOT work because 
>> I figured the document.write() call was overwriting your 
>> page, which would have made sense, but it appears 
>> document.write() actually appends to the document.  
>> I wouldn't swear to that, but that's what seems to 
>> be the case given my test.
>>     
>
> It's browser-dependent; on OSX/FF3 the form is gone after the document.write() (at least when Firebug is installed...) so I get an error.
>
> Dave
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
> __________ Information from ESET Smart Security, version of virus signature database 3679 (20081209) __________
>
> The message was checked by ESET Smart Security.
>
> http://www.eset.com
>
>
>
>
>   


-- 
Frank W. Zammetti
Author of "Practical Dojo Projects"
  and "Practical DWR 2 Projects"
  and "Practical JavaScript, DOM Scripting and Ajax Projects"
  and "Practical Ajax Projects With Java Technology"
  (For info: apress.com/book/search?searchterm=zammetti&act=search)
My "look ma, I have a blog too!" blog: zammetti.com/blog


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


[OT] Re: Displaying "Please Wait" message

Posted by Dave Newton <ne...@yahoo.com>.
--- On Tue, 12/9/08, Frank W. Zammetti wrote:
> [...] I actually expected the alert() to NOT work because 
> I figured the document.write() call was overwriting your 
> page, which would have made sense, but it appears 
> document.write() actually appends to the document.  
> I wouldn't swear to that, but that's what seems to 
> be the case given my test.

It's browser-dependent; on OSX/FF3 the form is gone after the document.write() (at least when Firebug is installed...) so I get an error.

Dave


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


Re: Displaying "Please Wait" message

Posted by "Frank W. Zammetti" <fz...@omnytex.com>.
RudyG wrote:
>
> function splashScreen()
> {
> 	document.write("<p
> style='color:black;background-color:aqua;text-align:center;margin:25% 25%
> 10% 25%;border: medium double black;'>Processing Data.<br>Please
> Wait.</p>");
> 	document.forms[0].submit();
> 	return true;
> }
>
>   
Put an alert("test"); in place of your submit() line there... does the 
alert show up?  I just tried in both FF and IE and in both cases it 
does... this indicates to me that it's the reference to the form that's 
not working.  So, try alert(document.forms[0]); and make sure you're 
getting the object you expect.  I actually expected the alert() to NOT 
work because I figured the document.write() call was overwriting your 
page, which would have made sense, but it appears document.write() 
actually appends to the document.  I wouldn't swear to that, but that's 
what seems to be the case given my test.

Anyway, as others have said, that's isn't the best approach anyway.  
Doing document.write() after the page has loaded is usually a good way 
to get yourself into trouble.  I suggest instead doing something like this:

<body>
  <div style="width:100%;height:100%;display:none;" 
id="pleaseWait">Please wait</div>
  <div style="width:100%;height:100%;" id="myContents">
  <!-- Everything else on your page goes here, including... -->
  <input type="button" 
onClick="document.getElementById('myConent').style.display='none';document.getElementById('pleaseWait').display='block';">
  </div>
</body>

You'll probably want to play some CSS tricks (or table tricks, if you 
don't mind the ridicule) to center the please wait message, which I 
assume you'd prefer.

Also keep in mind with all the suggestions so far: what happens if the 
call to the server takes too long, or doesn't work as expected?  Is 
there a graceful way for the user to recover?  Probably not, and maybe 
you can live with that, otherwise you might want to do something fancier 
(possibly a "click me to abort" link below please wait, or a timeout() 
that fires after X period of time and redirects to some "oops, the 
server's borked" page).

hth,
Frank

-- 
Frank W. Zammetti
Author of "Practical Dojo Projects"
  and "Practical DWR 2 Projects"
  and "Practical JavaScript, DOM Scripting and Ajax Projects"
  and "Practical Ajax Projects With Java Technology"
  (For info: apress.com/book/search?searchterm=zammetti&act=search)
My "look ma, I have a blog too!" blog: zammetti.com/blog


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


RE: Displaying "Please Wait" message

Posted by Martin Gainty <mg...@hotmail.com>.
can you display the error messages from TC logs?
when you run your script in FF with firebug do you see any JS errors?
also please attach applicable catalina.policy files

thanks
Martin 
______________________________________________ 
Disclaimer and confidentiality note 
Everything in this e-mail and any attachments relates to the official business of Sender. This transmission is of a confidential nature and Sender does not endorse distribution to any party other than intended recipient. Sender does not necessarily endorse content contained within this transmission. 




> Subject: Re: Displaying "Please Wait" message
> From: wesw@wantii.com
> To: user@struts.apache.org
> Date: Tue, 9 Dec 2008 18:34:13 -0500
> 
> One thing I have done in the past is to replace the submit button with
> an animated gif that resembles a status bar. This keeps users from
> double posting the form, and gives a bit of visual feedback to indicate
> to the user that he/she should wait.
> 
> If you want something more, you should take a look at the Execute and
> Wait Interceptor. ->
> 
> http://struts.apache.org/2.x/docs/execute-and-wait-interceptor.html
> 
> 
> 
> On Tue, 2008-12-09 at 14:40 -0800, RudyG wrote:
> > Hello.
> > 
> > I have an odd problem that I can't seem to resolve. I use struts along with
> > JSP to call Java Servlets on the back end. Some back end calls take a little
> > while when used by the WEB users so I've been asked to put up a message that
> > tells the users to "Please Wait" so that they don't press the Submit button
> > multiple times. So what I ended up doing was calling a Javascript function
> > from within the onclick() event of the Submit button. And here are the
> > contents of the function:
> > 
> > function splashScreen()
> > {
> > 	document.write("<p
> > style='color:black;background-color:aqua;text-align:center;margin:25% 25%
> > 10% 25%;border: medium double black;'>Processing Data.<br>Please
> > Wait.</p>");
> > 	document.forms[0].submit();
> > 	return true;
> > }
> > 
> > However the problem is that after the document write is executed the
> > processing stops. All attempts of doing the submit() from Javascript also
> > does not work as it gives some sort of permission violation. Does anyone
> > have any suggestions?
> > 
> > Thank you in advance.
> > Rudy
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 

_________________________________________________________________
Suspicious message? There’s an alert for that. 
http://windowslive.com/Explore/hotmail?ocid=TXT_TAGLM_WL_hotmail_acq_broad2_122008

Re: Displaying "Please Wait" message

Posted by Wes Wannemacher <we...@wantii.com>.
One thing I have done in the past is to replace the submit button with
an animated gif that resembles a status bar. This keeps users from
double posting the form, and gives a bit of visual feedback to indicate
to the user that he/she should wait.

If you want something more, you should take a look at the Execute and
Wait Interceptor. ->

http://struts.apache.org/2.x/docs/execute-and-wait-interceptor.html



On Tue, 2008-12-09 at 14:40 -0800, RudyG wrote:
> Hello.
> 
> I have an odd problem that I can't seem to resolve. I use struts along with
> JSP to call Java Servlets on the back end. Some back end calls take a little
> while when used by the WEB users so I've been asked to put up a message that
> tells the users to "Please Wait" so that they don't press the Submit button
> multiple times. So what I ended up doing was calling a Javascript function
> from within the onclick() event of the Submit button. And here are the
> contents of the function:
> 
> function splashScreen()
> {
> 	document.write("<p
> style='color:black;background-color:aqua;text-align:center;margin:25% 25%
> 10% 25%;border: medium double black;'>Processing Data.<br>Please
> Wait.</p>");
> 	document.forms[0].submit();
> 	return true;
> }
> 
> However the problem is that after the document write is executed the
> processing stops. All attempts of doing the submit() from Javascript also
> does not work as it gives some sort of permission violation. Does anyone
> have any suggestions?
> 
> Thank you in advance.
> Rudy
> 


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


Re: Displaying "Please Wait" message

Posted by RudyG <rg...@gmail.com>.
Hi EasyStrutser.

Your option 2 is my fallback option. Also thanks to Wes who chimed in with
the same suggestion. However, your option 3 sounds a little more
interesting. Any chance you might have a link to some place that expands on
that?
Would be greatly appreciated.

Thanks.
Rudy



EasyStrutser wrote:
> 
> 
> RudyG wrote:
>> 
>> Hello.
>> 
>> I have an odd problem that I can't seem to resolve. I use struts along
>> with JSP to call Java Servlets on the back end. Some back end calls take
>> a little while when used by the WEB users so I've been asked to put up a
>> message that tells the users to "Please Wait" so that they don't press
>> the Submit button multiple times. So what I ended up doing was calling a
>> Javascript function from within the onclick() event of the Submit button.
>> And here are the contents of the function:
>> 
>> function splashScreen()
>> {
>> 	document.write("<p
>> style='color:black;background-color:aqua;text-align:center;margin:25% 25%
>> 10% 25%;border: medium double black;'>Processing Data.<br>Please
>> Wait.</p>");
>> 	document.forms[0].submit();
>> 	return true;
>> }
>> 
>> However the problem is that after the document write is executed the
>> processing stops. All attempts of doing the submit() from Javascript also
>> does not work as it gives some sort of permission violation. Does anyone
>> have any suggestions?
>> 
>> Thank you in advance.
>> Rudy
>> 
>> 
> 
> 
> Perhaps you can try it in following ways:
>  1. by redirecting from step 1(submit page) into step 2(waiting page), no
> js required 
> 
>  2. diable the submit button after use has submit once, replace or wrapper
> it with waiting msg
> 
>  3. simply diable(make it look grey with JS) the whole page after the
> submit but just with an iframe which shows "waiting..." msg.
> 

-- 
View this message in context: http://www.nabble.com/Displaying-%22Please-Wait%22-message-tp20925275p20926391.html
Sent from the Struts - User mailing list archive at Nabble.com.


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


Re: Displaying "Please Wait" message

Posted by EasyStrutser <ja...@aol.com>.

RudyG wrote:
> 
> Hello.
> 
> I have an odd problem that I can't seem to resolve. I use struts along
> with JSP to call Java Servlets on the back end. Some back end calls take a
> little while when used by the WEB users so I've been asked to put up a
> message that tells the users to "Please Wait" so that they don't press the
> Submit button multiple times. So what I ended up doing was calling a
> Javascript function from within the onclick() event of the Submit button.
> And here are the contents of the function:
> 
> function splashScreen()
> {
> 	document.write("<p
> style='color:black;background-color:aqua;text-align:center;margin:25% 25%
> 10% 25%;border: medium double black;'>Processing Data.<br>Please
> Wait.</p>");
> 	document.forms[0].submit();
> 	return true;
> }
> 
> However the problem is that after the document write is executed the
> processing stops. All attempts of doing the submit() from Javascript also
> does not work as it gives some sort of permission violation. Does anyone
> have any suggestions?
> 
> Thank you in advance.
> Rudy
> 
> 


Perhaps you can try it in following ways:
 1. by redirecting from step 1(submit page) into step 2(waiting page), no js
required 

 2. diable the submit button after use has submit once, replace or wrapper
it with waiting msg

 3. simply diable(make it look grey with JS) the whole page after the submit
but just with an iframe which shows "waiting..." msg.
-- 
View this message in context: http://www.nabble.com/Displaying-%22Please-Wait%22-message-tp20925275p20926103.html
Sent from the Struts - User mailing list archive at Nabble.com.


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


Re: [OT] Re: Displaying "Please Wait" message

Posted by RudyG <rg...@gmail.com>.
Hello Dave. I understand why you feel this may not be a Struts issue.
However, the form I'm using in this JSP is a Struts form not an HTML form.

As for Google search results I have gone through half of the trillion search
results you are referring to and have not found a solution, yet. If you have
a link that addresses my problem, specifically please, I'd like to see that.
Please don't post a link for a file upload screen or some such. Perhaps you
misread my post or did not read it completely. I'm not asking how to do this
at this particular time. I'm asking about a specific problem I am having.
This same logic works with a basic HTML form, yet does not with a Struts
form. This is the essence of the problem.

Thanks for your help anyway.


Rudy



newton.dave wrote:
> 
> --- On Tue, 12/9/08, RudyG wrote:
>> I have an odd problem that I can't seem to resolve.
> 
> Not really a Struts issue, though.
> 
>> function splashScreen() {
>> 	document.write("...");
>> 	document.forms[0].submit();
>> 	return true;
>> }
>> 
>> However the problem is that after the document write is
>> executed the processing stops.
> 
> I'm not sure what the browser if it got a document.write() after the page
> has been rendered--as you've discovered the browser isn't sure what to do
> either.
> 
> It's reasonable to conclude that this is an inappropriate way to change
> DOM content after the page has been rendered. A web search will turn up
> about a hundred trillion hits for a variety of ways to do what you're
> trying to do.
> 
> Dave
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Displaying-%22Please-Wait%22-message-tp20925275p20926351.html
Sent from the Struts - User mailing list archive at Nabble.com.


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


[OT] Re: Displaying "Please Wait" message

Posted by Dave Newton <ne...@yahoo.com>.
--- On Tue, 12/9/08, RudyG wrote:
> I have an odd problem that I can't seem to resolve.

Not really a Struts issue, though.

> function splashScreen() {
> 	document.write("...");
> 	document.forms[0].submit();
> 	return true;
> }
> 
> However the problem is that after the document write is
> executed the processing stops.

I'm not sure what the browser if it got a document.write() after the page has been rendered--as you've discovered the browser isn't sure what to do either.

It's reasonable to conclude that this is an inappropriate way to change DOM content after the page has been rendered. A web search will turn up about a hundred trillion hits for a variety of ways to do what you're trying to do.

Dave


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