milestonetech
asked on
Have to simulate Cfquery load times and cfflush isn't working!!! Thoughts?
Hey guys -
I have to build a interactive loading bar to show page loads while various cfquery scripts run. My goal was to use cfflush to break up the queries and run a javascript to update the loading bar. For whatever reason, the whole page is just churning and then running all of the code at the end. Here's my script (nprogress is the loading bar function I'm using, start() starting it, inc() increasing it):
Any thoughts on why cfflush isn't dumping data? Obviously the queries are fake, but since the time delay is happening on the SQL side, this is more or less the exact way the page would load if it was real data.
Thanks!!
I have to build a interactive loading bar to show page loads while various cfquery scripts run. My goal was to use cfflush to break up the queries and run a javascript to update the loading bar. For whatever reason, the whole page is just churning and then running all of the code at the end. Here's my script (nprogress is the loading bar function I'm using, start() starting it, inc() increasing it):
<script>
NProgress.start();
</script>
BLA BLA
<cfflush>
<BR><BR>adfajdlfkajsdflk
<cfquery datasource="MOLMS">
SELECT GETDATE() CurrentTime
WAITFOR DELAY '00:00:05' ---- 5 Second Delay
SELECT GETDATE() CurrentTime
</cfquery>
<script>
NProgress.inc();
</script>
<cfflush>
<BR><BR>adfajdlfkajsdflk
<cfquery datasource="MOLMS">
SELECT GETDATE() CurrentTime
WAITFOR DELAY '00:00:05' ---- 5 Second Delay
SELECT GETDATE() CurrentTime
</cfquery>
<script>
NProgress.inc();
</script>
Any thoughts on why cfflush isn't dumping data? Obviously the queries are fake, but since the time delay is happening on the SQL side, this is more or less the exact way the page would load if it was real data.
Thanks!!
ASKER
thanks for the response dgrafx, no luck man....
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Thanks for the points!
I'm hoping this was of value to you and you didn't just accept for general purposes ...
Good Luck!
I'm hoping this was of value to you and you didn't just accept for general purposes ...
Good Luck!
<cfoutput>#repeatString(" ", 73729)#</cfoutput>
<script>NProgress.inc();</
<cfflush>