Hi Shiva, I'm enclosing a sample JSP page which you can use for giving the appearance that it's waiting till the DB processing goes through.
- - - - - - - - - - - - wait.jsp - - - - - - - - - - - - - - - - -
<html>
|
<head>
|
<style type="text/css">
|
#waitpart { position: absolute; }
|
#mainpart { position: absolute; visibility: hidden; } |
</style>
|
|
<script language="JavaScript"> |
function init () {
|
if (document.layers) {
|
document.waitpart.visibility = 'hide'; |
document.mainpart.visibility = 'show'; |
} else if(document.all) {
|
document.all.waitpart.style.visibility = 'hidden'; |
document.all.mainpart.style.visibility = 'visible'; |
} else if (document.getElementById) {
|
var elm = document.getElementById('waitpart'); |
elm.style.visibility ='hidden'; |
elm = document.getElementById('mainpart'); |
elm.style.visibility ='visible';
|
}
|
}
|
</script>
|
</head>
|
|
<body onLoad="init();">
|
<DIV ID="waitpart">
|
<center><H2><i> Wait please ... </i></H2></center> |
</DIV>
|
<%
|
//make sure the contents so far has been flushed |
out.flush();
|
%>
|
<DIV ID="mainpart">
|
<%
|
//just for testing.
|
// Your DB Processing relevant code comes here |
for (int i=0; i <100000; i++) {
|
out.println("Record:"+i);
|
out.println("<br>");
|
}
|
%>
|
<H1> Here comes the page............ </H1> |
</DIV>
|
</body>
|
</html>
|
- - - - - - - - - - - - - end page - - - - - - - - - - - - - - - -
Hope this gives you enough insight and you may think of better
alternative and share with others.
Regards,
Ashutosh
-----Original Message-----
From: Shiva Narayana [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 07, 2005 2:43 PM
To: [email protected]
Subject: Please wait page
hi all,
I m developing an application using WSAD 5.1.1,Struts.
I m trying to fetch data from the database. I m writing the code in
action class...
i want to display a page while doing the processing....
please help me.....
the same logic is implemented in the site www.travelocity.com
--
Regards
Shiva
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

