CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP

 Display “Loading …” while data loads into page

Print topic Send  topic

Author Message
smalloy

Posts: 107
Posted: 08/20/2005, 10:37 AM

I have a summary page that displays 5 tables of summary data. Each time a user foes to the summary page they must wait a full 5+ seconds for the page to load due to the complexity of the queries and the hierarchical nature of the data.

I’d like to have the user see a “LOADING …” graphic while they wait so they don’t become impatient and continually press the refresh or summary link. Any ideas?

Thanks

_________________
Anything can be done, just give me time and money.
View profile  Send private message
Theunis
Posted: 08/20/2005, 7:04 PM

s, here is 1 solution

**** first a bit of style to make your loading box look nice:
<style>
<!--
span.Information {
color : #ffffff;
font-size : 10pt;
font-weight : bold;
font-family : Tahoma, Arial, sans-serif;
}
#retrievedata {
position : absolute;
left : 4em;
top : 4em;
z-index : 100;
}
// -->
</style>

*** a script to remove the loading box
<script language="JavaScript">
<!--
function FinishLoad() {
if (parseInt(navigator.appVersion) >= 4) {
if (navigator.appName == "Netscape") {
document.retrievedata.visibility = 'hide';
} else {
document.all('retrievedata').style.visibility = 'hidden';
}
}
}
// -->
</script>

**** edit your body tag to call the loading box remove function
<body onLoad="javascript:FinishLoad()" >


**** display loading box - put it just after the body tag
<script type="text/javascript" language="JavaScript">
<!--
if (parseInt(navigator.appVersion) >= 4) {
document.write('<div id="retrievedata" onClick="FinishLoad()"><table bgcolor=#000000 border=0 cellpadding=5 cellspacing=0><tr><td align=center valign=middle nowrap><span class=Information>Retrieving Data...<\/span><\/td><\/tr><\/table><\/div>');
}
// -->
</script>

hope it helps
Theunis

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.