Solved

Page preloader when large amounts of data are loading.

Posted on 2007-11-26
2
538 Views
Last Modified: 2013-12-24
I have several complicated report with large <Cfquery's
I need a page preloader, as they can take several seconds to load.
i have tried the java ones, however they start after the CFQuerys

any ideas how to get  a preloader to work
0
Comment
Question by:kleigh
2 Comments
 
LVL 23

Expert Comment

by:debuggerau
ID: 20355579
display a page with a query to load the report into the next page would just require javascript.

After a few seconds load this page........
http://www.tizag.com/javascriptT/javascriptredirect.php
0
 
LVL 9

Accepted Solution

by:
digicidal earned 500 total points
ID: 20370267
What I have done is created a <DIV> that contains the loading page display, and then a second div that contains the rest of the page with the report in it.  Use CFFLUSH in between to force the first part of the page to display immediately... that will cause the loading DIV to display... and the rest of the page to process... then at the bottom of the page (the very bottom) add a javascript function to make that display div invisible.

I haven't actually used it for queries, but there are examples of this in the CFFLUSH documentation, however I have used it where I had a great deal of DHTML being done for a huge record set that had collapseable/expandable regions in the output.  Essentially I made an expand and collapse function for each header row as well as 4 dynamic functions controlling inline calls for each record to popup images of invoices, purchase history, stats, etc..  Since this because a HUGE page on large record sets it would appear that the browser had timed out - but it was actually still downloading the page text itself.   Because this took 20secs to 2mins depending on the browser and machine used to view the page, I added the loading div.  Here's a (truncated) example:
<div id="pleaseWaitMsg" align="center" style="padding:10px; border:2px solid #FFCC00; font-size:12px;">Please be patient... Preparing Display.</div>
<div class="label_2">Billing Documents</div>
	<div style="margin-top:3px; margin-bottom:3px;">
	<script language="javascript">
	// HERE I DO ALL OF MY TOP LEVEL FUNCTIONS.
	</script>
	<cfoutput query="qMyQuery.BillingData" group="CustomerName">
		<script language="javascript">
		// HERE I DO ALL OF MY SECOND LEVEL DYNAMIC JAVASCRIPT FUNCTIONS.
		</script>
		<div>
			<!--- Header (Cust) Grouping Data Output--->
		</div>
		<cfoutput>
			<script language="javascript">
			// HERE I DO ALL OF MY RECORD LEVEL DYNAMIC JAVASCRIPT FUNCTIONS.
			</script>
			<div>
				<!--- Individual ROW output for this group--->
			</div>
		</cfoutput>
	</cfoutput>
	</div>
<script language="javascript">
	document.getElementById('pleaseWaitMsg').style.display="none";
</script>

Open in new window

0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Firewall Speed Issue 6 68
ColdFusion Rereplace 3 78
Autoresponder for Whole Domain in Plesk/Cpanel 2 76
cookies analysis tools 2 91
In our day to day coding, how many times have we come across a necessity to check whether a URL is a broken link or not? For those of you that answered countless and are using ColdFusion like myself, then this article is for you.  It will show yo…
Article by: kevp75
Hey folks, 'bout time for me to come around with a little tip. Thanks to IIS 7.5 Extensions and Microsoft (well... really Windows 8, and IIS 8 I guess...), we can now prime our Application Pools, when IIS starts. Now, though it would be nice t…
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

806 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question