RudyG wrote:
function splashScreen()
style='color:black;background-color:aqua;text-align:center;margin:25% 25%
10% 25%;border: medium double black;'>Processing Data.<br>Please
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:

<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"

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).


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

Search Discussions

Discussion Posts


Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 7 of 13 | next ›
Discussion Overview
groupuser @
postedDec 9, '08 at 10:40p
activeDec 10, '08 at 5:21a



site design / logo © 2018 Grokbase