Posted: May 28, 2008 at 4:05 PM by Ben Nadel
As part of the project I am currently working on, I had to learn how to post files to the server using AJAX. I had never even attempted this before, so I was extra excited to learn something new. Of course, what you might learn quickly is that you cannot actually do this via "AJAX". Luckily, Rob Gonda warned me about this at the New York ColdFu... read more »
Comments (25) | Post Comment | Ask Ben | Live Chat (Beta) | Permalink
Posted: June 9, 2007 at 4:28 PM by Ben Nadel
Thanks to ColdFusion 8's support of JSON, we can easily convert ColdFusion objects to and from JSON using SerializeJSON() and DeserializeJSON(). In conjunction with this explicit JSON serialization, ColdFusion 8 has also added the ability for remote access ColdFusion functions to return ColdFusion objects as JSON data when they are invoked as ... read more »
Comments (12) | Post Comment | Ask Ben | Live Chat (Beta) | Permalink
Posted: May 16, 2007 at 9:19 AM by Ben Nadel
Now that Ray Camden's Beginner ColdFusion Content has ended, I can discuss my unofficial entry. Seeing as I am not a beginner, I could not technically enter the contest, but I thought it would be a cool little project to have a go at, especially since I am not tremendously proficient with CFCs and object oriented programming (OOP). Before I get... read more »
Comments (11) | Post Comment | Ask Ben | Live Chat (Beta) | Permalink
Posted: March 6, 2007 at 3:02 PM by Ben Nadel
I hesitate to call this a framework (as that seems to bring the pain from the Community). This is not really a framework, but rather a methodology that I am finding quite nice when developing a ColdFusion response to an AJAX request. I am sure stuff like this is all over the place, but in typical blood-and-guts fashion (any Dorian Yates fans out t... read more »
Comments (9) | Post Comment | Ask Ben | Live Chat (Beta) | Permalink
Posted: March 6, 2007 at 8:13 AM by Ben Nadel
I have been working on a mini AJAX and ColdFusion powered Chat application so that I can help people debug their code in a real-time way. One bug that has popped up early on is that "+" symbols are getting lost. From what I narrowed down, the "+" is not even making it into the database. The error is on the way In, not the way Out. After some de... read more »
Comments (3) | Post Comment | Ask Ben | Live Chat (Beta) | Permalink
Posted: March 2, 2007 at 7:21 AM by Ben Nadel
I was just fooling around with some JSON (JavaScript Object Notation) and kept this error whenever I tried to return a string value that contained line breaks: "unterminated string literal" I know what the error was (especially as FireFox's FireBug kicks sooo much butt with AJAX), but I couldn't understand how to get around it. Is it possible th... read more »
Comments (12) | Post Comment | Ask Ben | Live Chat (Beta) | Permalink
Posted: June 30, 2006 at 11:19 AM by Ben Nadel
I am working on using some AJAX type stuff in my site's administration. The AJAX code itself is not that crazy or hard. For me, the hardest part is coming up with an interface that is AJAX-friendly, but is also consistent with the rest of my application. I want AJAX to be integrated seamlessly. I don't want someone (me) to go a page and have it be... read more »
Comments (0) | Post Comment | Ask Ben | Live Chat (Beta) | Permalink
Posted: June 27, 2006 at 8:42 AM by Ben Nadel
After going through CFJSON, I created my own version with my own coding standards and quirkiness. To point out some non-superficial changes, my version: Does not have any try-catch blocks. I don't get the point. I don't see where the code can really fail. I am only checking standard types that should have standard values. I can't see what would b... read more »
Comments (9) | Post Comment | Ask Ben | Live Chat (Beta) | Permalink
Posted: June 26, 2006 at 6:30 PM by Ben Nadel
I was beating my head against the wall today for a bit trying to figure out why some values coming back from my ColdFusion JSON-esque solution where not evaluation properly. I had the following code in my AJAX data handler: this.OnLoad( eval( this.Connection.responseText ); ); Damn thing was driving me crazy. Kept all kinds of errors like ... read more »
Comments (67) | Post Comment | Ask Ben | Live Chat (Beta) | Permalink
Posted: June 26, 2006 at 9:40 AM by Ben Nadel
All of my recent AJAX interest and motivation has been fueled by the O'Reilly book, Head Rush AJAX. Overall, the book was good for me. I am a huge fan of the Head First book series and I think for more of a beginner, the book would have been truly fantastic. It really goes in depth into AJAX and manipulation of a web page through the Document Obje... read more »
Comments (4) | Post Comment | Ask Ben | Live Chat (Beta) | Permalink
Posted: June 26, 2006 at 9:32 AM by Ben Nadel
In an effort to learn AJAX and Javascript Object Notation (JSON), I am converting the CFJSON encoder into something that will fit into my architecture and standards; that's not meant to be snooty, I just have certain coding standards (such as capitalization and white-space utilization) that I like to follow. One of the things that I ended up cha... read more »
Comments (2) | Post Comment | Ask Ben | Live Chat (Beta) | Permalink
Posted: June 26, 2006 at 7:28 AM by Ben Nadel
I have been of late learning about AJAX and its integration with a ColdFusion application. As I started to understand the whole Xml Http Connection object and methodology I started to develop a form of dynamic Javascript code that would be passed back from the ColdFusion server and then evaluated by the web browser at the end of the AJAX call. It ... read more »
Comments (0) | Post Comment | Ask Ben | Live Chat (Beta) | Permalink
Posted: June 23, 2006 at 8:06 AM by Ben Nadel
As I talked about earlier, I am starting to get into AJAX and, as a hands-on kind of guy, I do my best learning from building. So, now that I have my XmlHttpRequest wrapper, I have created some functions for the server side of things that convert ColdFusion objects into Javascript objects that are going to be passed back to the browser. If you re... read more »
Comments (0) | Post Comment | Ask Ben | Live Chat (Beta) | Permalink
Posted: June 22, 2006 at 8:49 AM by Ben Nadel
I am just now getting into AJAX, and no, I have not been living in cave in Mars with my fingers in my ears. But yes, it's time to get on the horse. For those of you who don't know, AJAX is a way to send and receive data from the server without having to reload the current web page. This is done through the XmlHttpRequest object and some sweet Java... read more »
Comments (1) | Post Comment | Ask Ben | Live Chat (Beta) | Permalink