At the Orange County ColdFusion Users Group (www.occfug.org) meeting tonight, I will be presenting an overview on all the AJAX related features in ColdFusion 8. Then I will be going into detail on some of my favorite features and offer some tips on how to dig into the underlying Ext objects to find the solutions you need when your application requires more customized functionality than the default behaviors that were implemented in CF8.

So if you're in the Orange County area, come to Traveland USA tonight at 6:30 pm and join us.

A while back I blogged about a div layer positioning glitch that occurs in IE when you position a cfinput datefield above a cflayout or cfdiv generated div layer. This problem seems to be cause by the fact that in IE, a relative positioned element influences the stacking order of it's child-elements, which violates the CSS specification, but who really needs standards anyways right?

Well, I figured out a way to workaround it, and it's really stupid that I didn't think of it before. I kept trying (unsuccessfully) to write a JavaScript function that would find the layers and reposition them after the page loaded, when finally a light bulb went on in my head, and I came up with a much simpler solution.

[More]

In a comment on a previous post I wrote about Enhancing CFWindow with JavaScript, Ebenezer asked the question:

"CFwindows is quite nice, but i need it to behave in a particular way. I want to remove the frame and the (x) close button. I want to use cfwindow to just "display the bigger size of an image on mouseover and close on mouse out. Anyone with an idea."

Below is an example of how to remove the toolbar and borders from the cfwindow and display the large image when you rollover the thumbnail.

[More]

In a comment on a previous post I wrote about Enhancing CFWindow with JavaScript, Nathan asked the question:

"I like the center feature but if you want to move the window to a little below center what function do you call to center then move it down 20 px?"

The answer is to use the Ext.BasicDialog.center() function, then get the windows Ext.Element object using the Ext.BasicDialog.getEl() function. The Ext.Element object has the getX() and getY() methods, which will give you access to the windows X and Y coordinates. You can use those, in combination with the Ext.BasicDialog.moveTo() function, to move the window to your desired position relative to the center.

[More]

Michael Asked:

"Is there any way to add a minimize button to a CFWindow? "

As a matter of fact, the Ext.BasicDialog object that powers the CFWindow tag does have a "collapsible" configuration option. However, Adobe did not add that as an attribute in the CF8 implementation of CFWindow. They currently have it hard-coded so that all CFWindow generated dialogs are set to "collapsible:false". Hopefully they will add a collapsible attribute to the CFWindow tag in some future release, but until then, adding the Minimize/Maximize button onto the CFWindow tool bar is a fairly painless job with the snippet of JavaScript that you can find below.

[More]

I was working on a project the other day that was using CFGrid to manage some data and there was a button on each row to perform a certain action. However, we didn't want the background color of a row to change when the user clicks on a row or on the button. I created this little javascript that adds a listener to the "beforerowselect" event in the underlying Ext.grid's Row Selection Model and cancels any row selections, preventing the row from being highlighted.

[More]

The CFWindow tag is built using the Ext.BasicDialog object. This object has several public events that you can add listeners to. You can use the Ext.BasicDialog objects on() function to add listeners to these events that will fire a specific function when the specified event occurs. You can program the listener functions to react as necessary to the various events. Here is a list of the events that you can set up listeners for:

[More]

In a previous post I created a CFC to save simple variables into the session scope. In that CFC I had set up two functions, "SetSessionVar" and "GetSessionVar". However I ended up only needing the "SetSessionVar" function for my example so I never really tested the "GetSessionVar" function. Someone asked me today how to invoke it, and that is when I realized there were a couple little problems that I needed to fix.

[More]

I ran accross a noteworthy question on Experts-Exchange today regarding a javascript error that occurs when you have a cflayout that navigates to a page with a cfchart tag.

[More]

A couple weeks ago I wrote a post on Enhancing CFWindow with JavaScript, and it was recently asked if there was a way to identify all the windows and their visible status that currently exist on a page where you are using the ColdFusion.Window.create function to create new CFWindow instances. It took a few minutes of digging with FireBug, but I found that there is a ColdFusion.objectCache object that holds information about the various ext object that get created with the ColdFusion AJAX features. I created a function that loops through the objectCache and finds objects that have a "cfwindowname" property. Then used the Ext.BasicDialog.isVisible() function to determine if the window is currently visible.

[More]

More Entries

 
Home | Blog | Portfolio | Contact | © 2001 - 2007 The ColdFusion Guy - Scott Bennett. All rights reserved.
BlogCFC was created by Raymond Camden. This blog is running version 5.9.