Showing a Please Wait page

M

Matt Culbreth

Hello,

I've got a fairly typical request to show a "Plese Wait" page while a
long process is running. In this case, the user fills out a form,
presses the button, a process searches for items, and in about 6
seconds it is returned.

I've read up on the normal ways of doing this with a new Thread() or
with a META tag to refresh the page, but it seems most of these
methods use Session. We're not using Session at all in our web
app--totally stateless.

Does anybody have a good way of doing such functionality without
Session to keep the page state?

Thanks,

Matt
 
V

vMike

I don't know if this will help you but here is a control that displays a
progress bar using javascript. It is call by starting the startMsg(). This
progress bar is fairly short but you can modify the parameter to increase
it. I can't take credit for the code but maybe it will help you.

<%@ Control %>

<div id="waiting">
<table id="msgCell" align="center"><tr><td>
Processing please wait ...
</td></tr><tr><td style="font-size:8pt;padding:2px;border:solid black 1px">
<span id="progress1">&nbsp; &nbsp;</span>
<span id="progress2">&nbsp; &nbsp;</span>
<span id="progress3">&nbsp; &nbsp;</span>
<span id="progress4">&nbsp; &nbsp;</span>
<span id="progress5">&nbsp; &nbsp;</span>
<span id="progress6">&nbsp; &nbsp;</span>
<span id="progress7">&nbsp; &nbsp;</span>
<span id="progress8">&nbsp; &nbsp;</span>
<span id="progress9">&nbsp; &nbsp;</span>

</td></tr></table>
</div>

<script language="javascript">
var progressEnd = 9; // set to number of progress <span>'s.
var progressColor = 'blue'; // set to progress bar color
var progressInterval = 500; // set to time between updates (milli-seconds)

var progressAt = 0; //progressEnd;
var progressTimer;

function progress_clear() {
for (var i = 1; i <= progressEnd; i++)
document.getElementById('progress'+i).style.backgroundColor = 'transparent';
progressAt = 0;
}
function progress_update() {
progressAt++;
{if (progressAt > progressEnd) {
progress_stop()
}
else

{document.getElementById('progress'+progressAt).style.backgroundColor =
progressColor
progressTimer = setTimeout('progress_update()',progressInterval);}}

}

function progress_stop() {
progress_clear();
window.clearTimeout(progressTimer);
// hideobj('waitingDiv','');
//hideobj('waiting','none')
}
function startMsg() {
// hideobj('waitingDiv','none');
progress_update();
}


function hideobj(objname,type) {
var div1=document.getElementById(objname);
div1.style.display = type;

}
</script>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,754
Messages
2,569,521
Members
44,995
Latest member
PinupduzSap

Latest Threads

Top