Here is something interesting I just ran into. One of my open bugs at work involve adding a "Loading" graphic to an ajax container. The code in question uses CFDIV and hits up a CFC to load the data.
I thought about it this for a second and thought to myself, "Self - doesn't CF8 automatically do loading graphics?"
I whipped up a quick test to confirm this:
<cfdiv bind="url:test3.cfm" />
and test3.cfm just did:
<cfset sleep(5000)>
test 3
When I ran this I plainly saw a loading message and graphic. So why wasn't it working in our product? I noticed that the code used cfc:, not url:, so I quickly modified my test:
cfc:<br>
<cfdiv bind="cfc:test.getslow()" />
<p>
url:<br>
<cfdiv bind="url:test3.cfm" />
The CFC method getslow did the same thing test3.cfm did. When I ran this I saw:

As you can see, the CFC based one has no form of loading message while the URL one does. I could switch to a URL based CFC call, but this is rather odd. I can't see why one form of remote call would get a message and another would not.
Archived Comments
was your output on the cfc set to no?
Yep. To be clear, the output from the CFC did show up. I just didn't have the nice loading msg while it waited.
If I had to guess. bind="cfc:" is probably using ajaxproxy and is going straight to the cfc, where-as the bind="url:" is probably using a javascript http call and is actually waiting for a response?
Well, even when using ajaxproxy, it is still HTTP calls. It has to be. ;)
Did you ever learn more about this Ray? I like the loading graphic and would like it to appear when I bind to a CFC.
Nope, sorry. We ended up switching to jQuery anyway. :)
I've struggled with the loading icon bug related to cfgrid for awhile and have submitted a bug to Adobe as well as posted on the Adobe Forums without any success and little response. Not sure if this might help your thoughts, but in trying to get the icon to work on the cfgrid I used the sample that Adobe provides with CF and have stripped it down here, but the issue seems to be with the CSS. The div-based example below works, but when I try to get it to work with a cfgrid, no go.
----------------
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/...">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Paging Grid Example</title>
<link rel="stylesheet" type="text/css" href="file:///C|/ColdFusion8/wwwroot/CFIDE/scripts/ajax/ext/resources/css/ext-all.css" />
<script type="text/javascript" src="file:///C|/ColdFusion8/wwwroot/CFIDE/scripts/ajax/ext/adapter/ext/ext-base.js"></script>
<script type="text/javascript" src="file:///C|/ColdFusion8/wwwroot/CFIDE/scripts/ajax/ext/ext-all.js"></script>
<script type="text/javascript" src="file:///C|/ColdFusion8/wwwroot/CFIDE/scripts/ajax/ext/examples/grid/paging.js"></script>
</head>
<body>
<div id="topic-grid" style="border:1px solid #99bbe8;overflow: hidden; width: 665px; height: 300px;position:relative;left:0;top:0;"></div>
</body>
</html>
Hi,
Just I want ot know like in what using js we generally load the dynamic content on ajax call in side a div id.Basically we pass div ids and urls in the javascript function and then load the contents.
Is there any way we can do it through cf8 ajax features,so afr as i have seen is cf8 only gives the ajax control.