Re: JSP Loading Page... Please wait while my code doesn't work!



On May 30, 2:40 pm, Nino <nino9st...@xxxxxxxxx> wrote:
Hi.

I have tried, and tried again to build a "Please wait..." loading page
in JSP. I have read all the posts I could find on the matter and
incorporated what seemed to be a set way to do this.

Here is the premise that just about every bit of information I
gathered suggested:
In the HEAD tag:
<STYLE>
#waitPage { position: absolute; }
#loadPage { position: absolute; visibility: hidden; }
</STYLE>

<SCRIPT language="JavaScript">
function initWait () {
if (document.layers) {
document.layers['waitPage'].visibility = 'hide';
document.layers['loadPage'].visibility = 'show';

} else if (document.all) {
document.all['waitPage'].style.visibility = 'hidden';
document.all['loadPage'].style.visibility = 'visible';

} else if (document.getElementById) {
document.getElementById('waitPage').style.visibility = 'hidden';
document.getElementById('loadPage').style.visibility = 'visible';
}
}
</SCRIPT>

In the body tag:
<BODY onload="initWait();">

Within the body...
<DIV id="waitPage">
This is where the graphics, or Please wait... text would go
</DIV>

<DIV id="loadPage">
This is where all the work goes (function calls, etc)
</DIV>

And that's it!!! Well, I tried this and it doesn't work. Is there
anything I'm missing? Does it matter what engine renders my JSPs
(Tomcat)? Does it matter what kind of work is being done? The type of
HTML that is built into the waiting DIV tag (for example, can I use
table tags?)?

JSPs are completely[1] evaluated by the server into an internal buffer
and then sent to the browser all at once. Even if it weren't, you'd
want to call out.flush (); after your waitPage div had been output but
before the loadPage div was sent.

[1] Usually, unless it's not. As with so much else, this is
configurable behaviour.

.



Relevant Pages

  • Re: Master pages with a onload command.
    ... no parentheses}" Then it doesn't matter where your tag is. ... in a <div> that I hide/unhide when a checkbox is clicked and it's all done ... at the client level. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: mutt: thread reconstruction?
    ... >> I'd like suggestions on how I might go about restoring at least ... >> this matter. ... > Tag the message you want to attach to, scroll down to the top message ...
    (Debian-User)
  • RE: REPOST:Add listing tick box on Document Library:Upload Docume
    ... if the tag is removed from the template upload.aspx page the same ... >> Sorry for the quick repost but i have an urgency to resolve this matter. ... >> to an alert for the document they would get two alerts one for the document ... this returned a not well formed server tag error. ...
    (microsoft.public.sharepoint.portalserver.development)
  • Re: jsp:getProperty question
    ... in the Sun example the is not referencing the bean ... servlet or from some code called by a servlet. ... The JSPs Java file has an error on the line: ... So I ask here but I guess I'll have to find the schema of the jsp tag ...
    (comp.lang.java.programmer)
  • Re: Annie Oakley strikes again
    ... You're allowed multiple kills? ... buck and unlimited does for $2.00 a tag. ... "Do what you want and say what you feel because those that mind, ... matter and those that matter, ...
    (rec.motorcycles)