Main

AJAX Archives

March 7, 2008

A gotcha when calling Java/CFC with AJAX

I wanted to share this "gotcha" that I spent an hour on the other night: I was using <cfajaxproxy> to call a CFC that I had created as a proxy to another (the proxy CFC had methods which were accessible remotely, while the other CFC, stored in session, had public methods that woudn't have been accessible via AJAX. The final CFC accessed Java functionality. The proxy was really simple; it just took the exact same arguments as did the other CFC, and passed them on to the appropriate method call:

<cffunction name="setIndicator" access="remote" output="Yes" returntype="boolean">
        <cfargument name="cat" required="Yes" type="string">
        <cfargument name="indicator" required="Yes" type="boolean">
		
        <cfreturn SESSION.user.finalcfc.setIndicator(ARGUMENTS.cat, ARGUMENTS.indicator) />
</cffunction>

But every time I tried to call the proxy via AJAX, I received an error...

Continue reading "A gotcha when calling Java/CFC with AJAX" »

March 3, 2008

Updates to textarea-resizer script

After my recent post on enabling resizable textareas with the textarea-resizer script, a reader noted that the script shouldn't be run in Safari 3 since that browser adds its own resizer widget in the lower-right-hand corner of all textareas. So, with confirmation from the script's author Jonathan Leighton that the textarea-resizer script is redistributable and modifiable under the GPL, I've posted a tweak to the script so that it won't run on Safari 3. I've also included my own stylesheet and handle graphic for the grab bar.

Download textarea-resizer.zip

FancyZoom: like lightbox, but with a "zoom" effect

I came across FancyZoom the other day, which calls itself "Smooth Javascript Image Zooming For Your Web Pages". It's a lot like lightbox, but with a "zoom" effect and no shading over of the original page.

Continue reading "FancyZoom: like lightbox, but with a "zoom" effect" »

February 28, 2008

Click-and-drag resizing of a textarea

In a few applications, I've noticed a relatively new feature (at least, new to me): a "handle", or bar, at the bottom of a textarea that allows you to resize it by clicking-and-dragging. I think this is a great addition to the usability of any site where a user might type in just a little or a lot into a textarea.

There are a number of JavaScript toolkits which can give you this capability, but not everyone wants to add the loadtime of a full toolkit to their site. So I'll point out one script that can give you this capability: Jonathan Leighton's Textarea Resizer.

Continue reading "Click-and-drag resizing of a textarea" »

February 14, 2008

Updates to Clickheat for ColdFusion

Colin suggested some smart changes for my Clickheat for ColdFusion project, which I've duly commited. Here goes:

  • In settings.cfm, I've taken my own email address out. [Doh!]
  • In click.cfm, I've replaced hard-coded email addresses in the CFCATCH with the email variables from settings.cfm.
  • In click.cfm, I've replaced GetDirectoryFromPath() with VARIABLES.logPath from settings.cfm.
  • In index.cfm, I've changed the form action to index.cfm instead of view.cfm.
  • In clickheat.js, I've changed URL paths which refer to the root so that they're relative to the root, so that the application will work correctly in any location off the root.

June 15, 2007

How do you get Google Analytics to track AJAX requests?

An interesting question came up in conversation during my ride to work this morning: can Google Analytics track users if a site's registration process consists of AJAX calls instead of multiple page requests?

Continue reading "How do you get Google Analytics to track AJAX requests?" »