Skip to content

Ben Nadel Ajax and JQuery Feed
Syndicate content Ben Nadel ColdFusion, jQuery, And Web Development Feed @ BenNadel.com
Recent blog posts covering ColdFusion, jQuery, Web Development, and other topics
Updated: 3 weeks 6 days ago

Very Simple Pusher And ColdFusion Powered Chat

Wed, 06/30/2010 - 17:39
When it comes to AJAX and WebSockets, it's hard to think about client-server interaction without eventually thinking about Chat. Chat applications are probably one of the first ways in which we ever experienced remote communication outside of the traditional web-based, request-response life cycle. As such, I think there is a certain romance with the chat paradigm - something about it just feels special in a way that I can't quite articulate. So it should come as no real surprise that I wanted ... Read More »
Categories: Blogs

Pushing Base64-Encoded Images Over HTML5 WebSockets With Pusher And ColdFusion

Tue, 06/29/2010 - 15:46
Yesterday, I started playing around with Pusher , a realtime push notification web service that allows your server to "push" updates to the client using native HTML5 or Flash-based WebSockets. If you don't know what WebSockets are (neither did I), they provide a way for the client to open up a direct line of communication with the server. The server can then send information back to the client at any time without the client having to constant ... Read More »
Categories: Blogs

Using ColdFusion With Pusher - A Notification Service Powered By HTML5 WebSockets

Mon, 06/28/2010 - 17:20
I recently signed up for the Beta program of Pusher , a realtime push notification service powered by HTML5 WebSockets. Pusher provides a RESTful web service to which you can POST client notification messages. The Pusher web service engine then relays those notifications to all clients that have subscribed to your "pusher application" over HTML5 WebSockets. From what I have read, WebSockets allow the browser to open up a direct line of commun ... Read More »
Categories: Blogs

Detecting iPhone's App Mode (Full Screen Mode) For Web Applications

Thu, 06/24/2010 - 17:11
As I have been experimenting with HTML5's new features ( SQLite , Cache Manifest , Offline Applicatio ... Read More »
Categories: Blogs

Pages Cached By The Cache Manifest Do Not Need To Reference The Cache Manifest

Wed, 06/23/2010 - 16:35
In last night's post, I discovered that non-cached pages could not make use of resources cached within the application cache . As I was experimenting with that concept, I found that when I added a cache manifest reference to the non-cached page, it both became cached and was granted access to the other cached resources. This is, of course, the expected behav ... Read More »
Categories: Blogs

Non-Cached Pages Cannot Access Resources Cached In The Cache Manifest

Wed, 06/23/2010 - 03:03
In my previous post on HTML5's Cache Manifest , Ray Camden and I got into a great discussion about how pages would interact with resources cached by the Cache Manifest file. I was explaining to him that in my experience, any file that linked to the cache manifest was itself automatically cached ev ... Read More »
Categories: Blogs

Using The Cache Manifest With iPhone's App Mode For "Native" Web Applications

Tue, 06/22/2010 - 18:01
After playing around with HTML5's new Cache Manifest for creating offline web applications , I thought a good next step would be to play around with the Apple iPhone's "App Mode" that allows web applications to be run more like native iPhone applications. This includes the ability to run in full-screen mode as well as use a homescreen icon and a startup "sp ... Read More »
Categories: Blogs

Experimenting With HTML5's Cache Manifest For Offline Web Applications

Mon, 06/21/2010 - 17:06
After playing with Safari's SQLite support for use with creating client-side databases , I thought I would try looking into HTML5's "Cache Manifest" for creating offline web applications. The Cache Manifest is a text file that lists out all of the application resources that need to be cached in order for the given application to work without an internet connection. The files ... Read More »
Categories: Blogs

Refactoring My Safari SQLite Local Database Example

Tue, 06/15/2010 - 17:20
The other day, I played around with Safari's SQLite support for the first time , creating a very simple, single-table example. This really opened my eyes up to some of the possibilities of creating very rich, very responsive web-based apps geared towards mobile deployment (via the various WebKit implementations). Of course, the exploration only created about a thousand new ... Read More »
Categories: Blogs

My Safari Browser SQLite Database Hello World Example

Fri, 06/11/2010 - 16:38
After watching Ray Camden give his " Beginning SQLite Database Development for AIR " presentation yesterday, I was feeling very inspired. I've seen SQLite before, but I've never done anything with it. I don't have anything installed for AIR development (I'll be switching to ColdFusion Builder soon enough); so, I figured I would experiment with SQLi ... Read More »
Categories: Blogs

Typing High Ascii Values On A Standard Keyboard

Mon, 06/07/2010 - 16:14
Most applications have some way for you to enter high ASCII characters that are not immediately represented on the keyboard. Homesite, for example, has its Extended Character panel and Fireworks has its Special Characters panel. As it turns out, however, there is a way, at least on Windows, to enter high ASCII characters using just the keyboard and the ASCII number. If you hold down the ALT key, use the number pad to type in the ASCII value, and then release the ALT key, the computer will ent ... Read More »
Categories: Blogs

Regular Expressions Are Officially Not Safe For Work (NSFW)

Fri, 05/21/2010 - 01:29
Last week, for Regular Expression Day 2010 , I asked my friend to help me spread the word about how amazingly awesome Regular Expressions are. We did this by taking some sexy photos involving Regular Expressions and seductive imagery - just a lit ... Read More »
Categories: Blogs

Using The WITH Keyword With Javascript's Function() Constructor

Thu, 05/20/2010 - 15:51
Yesterday, I blogged about using the eval() function in conjunction with Javascript's Function() constructor in order to copy context variables into the local scope of the executing function. This was meant to allow non-scoped variables, references within the compiled function, to change with each execution. In a conversation following the post, ... Read More »
Categories: Blogs

Faking Context In Javascript's Function() Constructor

Wed, 05/19/2010 - 17:52
In my jQuery Template Markup Language (JTML) project , I needed a way to compile JTML templates down into Javascript functions such that they could be executed at any time in order to generate new HTML markup. This is a tricky problem because the JTML code makes references to non-scoped variables that have to be available in the rendering engine's context at the time that it executes. When I ... Read More »
Categories: Blogs

Exploring Javascript's eval() Capabilities And Closure Scoping

Tue, 05/18/2010 - 17:04
A little while ago, while working on the jQuery Template Markup Language (JTML) code, I used Javascript's Function() constructor to compile template markup and found out that it doesn't create a closure to the context in which it was executed . I blogged about this an ... Read More »
Categories: Blogs

Regular Expressions Are Hella Sexy! (Saucy)

Mon, 05/17/2010 - 17:19
(Inter)?National Regular Expression Day was started three years ago because Regular Expressions (RegEx) are so amazing that they simply deserve a day of celebration. For those of you who use regular expressions in your programming work, I am sure you get it - it's obvious. For those of you who might not be too familiar with regular expressions, however, ... Read More »
Categories: Blogs

When To Use \N And $N As Regular Expression Back-References

Mon, 05/17/2010 - 15:52
The other day, I was talking to Ryan Jeffords about regular expressions (RegEx) and there was some confusion about when to use \N versus when to use $N as a captured-group back-reference. It can only be one or the other, so figuring it out is generally not a big issue. But, this does happen to be one of those things that is a bit different in each technology. As such, I thought I would write up a quick comparison of the regular expres ... Read More »
Categories: Blogs

3rd Annual (Inter)?National Regular Expression Day (And Prizes) - June 1st, 2010

Sun, 05/16/2010 - 19:53
Well, it's almost that time again; June 1st, 2010 will be the 3rd annual (Inter)?National Regular Expression Day - a celebration of powerful string manipulation! Typically, this day kind of sneaks up on me, so this year I wanted to try and make a bigger todo of it. Regular Expressions are special strings that represent patterns of character data. They can be used to search, replace, and validate text content and happen to be one of the most powerful tools in the developer's t ... Read More »
Categories: Blogs

Javascript's hasOwnProperty() Method Is More Consistent Than The IN Operator

Tue, 05/11/2010 - 16:22
This is just a very quick follow-up to my previous post on using Javascript's IN operator with String values . When I first blogged a while back about using Javascript's IN operator , James ... Read More »
Categories: Blogs

Javascript's IN Operator Does Not Work With Strings

Tue, 05/11/2010 - 15:39
A while back, I learned that you could use the Javascript IN operator to test for object property existence . This was a great find because it tested for the presence of a key and not just the key's value (which might evaluate to False). Since all core data types in Javascript extend the base Object in one way or another, I figured that the IN operator would ... Read More »
Categories: Blogs