By barneyb on January 15, 2010
For quite some time now I've had a sidebar widget that displays an excerpt of my Twitter feed on my blog. It uses the standard Twitter JSON/P interface for loading the tweets and then a Twitter-provided script (http://twitter.com/javascripts/blogger.js) for rendering them on the page. Unfortunately the default installation instructions would have you set up something [...]
Posted in javascript, meta
By barneyb on June 3, 2009
Last night I needed a simple HTML table with sortable columns, and after a quick Googling, found the TableSorter jQuery plugin. I'd come across it before, but never actually used it. Added a class to my table (for targeting and to leverage the CSS that it comes with), added the required line of JavaScript to [...]
Posted in javascript
By barneyb on April 10, 2009
If you only ever use the type-specific event helpers (.click(), .load(), .change(), etc.), you're potentially missing out on a really handy feature of jQuery: bind data. Bind data is data associated with the bound handler function, available to every invocation of it, but not in any "normal" variable scope. It's kind of like currying, except [...]
Posted in javascript
By barneyb on April 9, 2009
If you're using the new jQuery.live("type", fn) handlers in jQuery 1.3, be careful with the "click" event type. Unlike jQuery.bind("click", fn) and jQuery.click(fn), jQuery.live("click", fn) doesn't distinguish between mouse buttons. So while the "normal" handlers will only trigger when the left button is used, the live handler will trigger on any button.
The workaround is pretty [...]
Posted in javascript
By barneyb on March 17, 2009
Ray Camden posted an interesting article over on InsideRIA about expanding short urls using jQuery and ColdFusion. After reading the article, I thought he was overcomplicating things somewhat by relying on the url shortening services' APIs to do the lookups. Yes, that's what APIs are for, but for this case, HTTP happens to be a [...]
Posted in cfml, development, javascript
By barneyb on December 10, 2008
About four and a half years ago I wrote a little event tracking app that accepts a timestamp and a list of tags, and then provides a pile of ways to report on the data. Think Twitter, except a couple years earlier, and designed for consumption by software, not people, at least at the individual [...]
Posted in ajax, database, development, javascript, tools
By barneyb on November 22, 2008
Yesterday I replaced an instance of my ComboBox widget with a jQuery Autocomplete. A sad day it was. However, I saved a JS file and a few K of download, so it was worth it. Unfortunately, it's missing a fairly important bit of functionality: the ability to order the list of options.
If you're doing an [...]
Posted in ajax, javascript, tools
By barneyb on October 22, 2008
The current state of web applications is a fragmented mess. HTML is still the standard approach, but dynamic data loading with Ajax and application embedding with Flash are both incredibly popular, particularly for data-heavy applications.
HTML is great because it's easy to build and well understood by user agents, but you lack drawing capabilities. SVG addressed [...]
Posted in ajax, flex, javascript, tools
By barneyb on October 20, 2008
I've released FlexChart 2.0 today. Binary download is available here: flexchart_2-0-r4392.zip. The demo app is still available, of course. Backwards compatibility is not quite 100%, as I'll explain below, but the non-compatibilities only affect certain classes of charts, and they're the complex ones. For simple stuff it should be drop-and-go.
There are no real outward changes [...]
Posted in flex, javascript, tools
By barneyb on September 30, 2008
Been a long while since I've made any updates to FlexChart, and this is only a minor one, but it's potentially important. Since it's designed to be used in JavaScript applications, data tips and click events are all processed by JavaScript (not ActionScript). When I'd created the data tip callbacks, I'd neglected to considered the [...]
Posted in flex, javascript, tools