Well I gave it a go at the jQuery plugin deal, and well.. I dont think version 0.1 turned out too darn bad. jQuery Impromptu as I’m calling it is a nice little plugin to simulate a nice css/js alert or prompt You may also add forms custom forms and elements to your prompts as well. A few of the options allows you to narrow the allert down to an html element on the page(given it is relative or absolutely positioned) and create as many buttons on your prompt as you wish! A callback function lets you process your forms. Please give it a shot on my examples page and please let me know if you have suggestions or constructive criticism or any other comments.
July 2007
Mon 16 Jul 2007
Sun 8 Jul 2007
Well I’ve been playing with jQuery for a little while now and I really like its “query” like abilities to traverse the DOM. It has probably become my favorite javascript library. But I also discovered another project in the making.. CFJS, by Chris Jordan, a project working to implement many common CF functions using javascript. Not to be misled, many of the functions implemented can be helpful no matter what language you’re use to(like Array functions, List functions and decision functions). The idea behind it is to implement many of the most useful ColdFusion functions to ease the pain of js development.
I found that this really helps out when doing things like form validation. For instance.. I have an email field that I want to validate as an email(could be ssn, or telephone, etc,..). I would use the IsValid(’email’) function check with CF that it is an email address. Well now you would do the same with in javascript with CFJS. Maybe I want to validate a group of checkboxes to make sure there’s atleast two items selected,.. I could check with ListLen() to make sure there are two selected. Again, not to be mislead, you don’t have to be using CF or familiar with CF to use this library(nor do you have to use it with jQuery as there is a version that runs independently).
There’s a lot of potential with the jQuery library as well as the CFJS extension. Developers no longer need to feel like they’re tied down with spry when using JS and CF, there are other great options out there thanks to projects like this!
