Here's something else i found out, whenever i try to do a bind using cfselect i don't even see it calling the cfc using the debugger, but i can call the cfc all day manually invoking it, has anyone seen this happen before?
So as soon as they choose a state, it will automatically call the cfc with the state as the argument and then populate the next select box, of cities in that state.
Here is the first thing that turned up for me on a Google Search for AJAX.
Then your CFC just needs to return the data in the proper format whenever it receives a request.
I like your idea alot, i will definitely go that route. Do you know where i could find a very simple example on how to do something like this?
1 person found this helpful
Well if find the W3schools tutorials, such as the one I already linked to, to be pretty damn easy to follow.
Here is an 11 part series I found very informative:
14 Aug 2007
27 Mar 2007
Making asynchronous requests isn't just about talking to your own server-side programs. You can also communicate with public APIs like those from Google or Amazon, and add more functionality to your Web applications than just what your own scripts and server-side programs provide. In this article, Brett McLaughlin teaches you how to make and receive requests and responses from public APIs like those supplied by Google.
23 Jan 2007
In the last article of the series,you saw how your Ajax apps can format requests to a server in XML. You also saw why, in most cases, that isn't a good idea. This article focuses on something that often is a good idea: returning XML responses to a client.
07 Nov 2006
Brett McLaughlin demonstrates how you can use XML as the data format for sending asynchronous requests.
10 Oct 2006
Continue to explore how DOM programming fits into interactive Ajax applications as Brett McLaughlin completes his trilogy of articles on DOM programming with a DOM application in practice.
12 Sep 2006
Last month Brett introduced the Document Object Model, whose elements work behind the scenes to define your Web pages. This month he dives even deeper into the DOM. Learn how to create, remove, and change the parts of a DOM tree, and take the next step toward updating your Web pages on the fly!
11 Apr 2006
14 Mar 2006
Most Web applications use a request/response model that gets an entire HTML page from the server. The result is a back-and-forth that usually involves clicking a button, waiting for the server, clicking another button, and then waiting some more. With Ajax and the XMLHttpRequest object, you can use a request/response model that never leaves users waiting for a server to respond. In this article, Brett McLaughlin shows you how to create XMLHttpRequest instances in a cross-browser way, construct and send requests, and respond to the server.
17 Jan 2006
06 Dec 2005
I also find that Google searches tuns up TONS of information for popular topics like 'AJAX'.
And of course the ColdFusion documentation has entire chapters on using AJAX with CF complete with sample code.
Using Ajax UI Components and Features
Using Ajax Data and Development Features
Wow, thank you very much for this info, defintely was very helpful. Also i finally figured out what was going on with it not calling the CFC, the reason was that i needed to create a shortcut in my root directory to the CFIDE/scripts directoryt and now i see it calling the CFC but it still doesn't display anything in the cfselect box even though i see it grabbing all the info in the debugger window. Any ideas on why this would be happening?
1 person found this helpful
Not really, as I have little idea what your code looks like or how you are doing this.
A couple of well known gotcha's:
Having onRequestStart() or OnRequest() functions in an Applicaiton.cfc file that mangle the request and|or response.
Having content in Application.cfm file that is prepended to the beginning of the response, whcih will break XML formats.
Not returning infomation in a format that can be handled by the response handler.
I beleive the Firebug debugger tool is indespensible in debugging all of this, if you are not using it.
Ur the man, i just did some more research on what you said and created a dummy OnRequestEnd.cfm with nothing inside of it and now it populates the select box. But i'm running into something weird though, it populates it fine, but the first one always comes up blank, do you know of way to fix this?
I can only presume that the response you are sending has a blank element at the top of it. Or the response handler that is processing the response into the select element is doing so in a manner the creates or leaves a blank element at the top of the select elements child nodes.