ColdFusion 8: Demo of CFGRID, Ajax binding, and CFWINDOW

So I plan to spend time later on talking more about the Ajax work in ColdFusion 8, but I thought I’d share a demo I whipped up for Ben a few weeks back. This demo integrates with Yahoo’s Traffic service using my CFYahoo library. Simply enter a zip, hit Go, and the grid will populate with traffic data. When you select a row, I then use a map to show you information about the traffic hot spot.

All of the “magic” can be seen in one line:

<cfinput type="text" name="zip" />

<cfgrid name=”reportsGrid” format=”html” pageSize=”5” stripeRows=”true” bind=”cfc:yahooProxy.getTraffic({cfgridpage},{cfgridpagesize},{cfgridsortcolumn},{cfgridsortdirection},{zip})”> </code>

The bind attribute tells ColdFusion to speak to my CFC and use the results for the data.

The code is available below. To run this, be sure to download the CFYahoo package first. And yes - I was trying to be artsy with my design here. Normally I’m not allowed to design anything. ;)

And yes - I hope to have everything up and running on CF8 here soon.<p>Download attached file.</p>

Raymond Camden's Picture

About Raymond Camden

Raymond is a developer advocate. He focuses on JavaScript, serverless and enterprise cat demos. If you like this article, please consider visiting my Amazon Wishlist or donating via PayPal to show your support. You can even buy me a coffee!

Lafayette, LA https://www.raymondcamden.com

Comments