Andy, >On this page: >http://www.cfmjet.com/airports.cfm > >You'll see links to several airports. I'm using CFHTTP to load in data from >a site that has detailed information on each of these airports. You'll >notice that when you click each of the links, it takes between 10 and 20 >seconds to even show that the page is doing anything, much less display the >content. > >My client is insistent on saying something like "load times may vary" or >some other cheesy phrase. I'm wondering if I can go a little further and >show some sort of loading bar when each of those links are clicked before >displaying the content. > >I think I might be able to use something like cfflush, but I'm not sure how >that would work. Does anyone have any suggestions?
Here's a very basic solution, with just the minimum code. The idea is the first flush displays part of the content w/ a please wait message and then a flush is done to push the message to the screen. Then you do your CFHTTP request and then use JS to hide the layer and flush again. The other thing you could do is have the CFHTTP results write to a session variable or a file and then just relocate the user to a new page when the CFHTTP request has completed. <html> <body> <div id="idLoading"> <div> Please Wait... </div> <div> We're are gathering the data for your request. </div> </div> <cfflush /> <cfhttp ... put your code here... ></cfhttp> <script type="text/javascript"> document.getElementById("idLoading").style.display = "none"; </script> <cfflush /> .... finish page load ... </body> </html> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:256302 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4