Dynamically set onClick events in IE and Firefox

I’ve had a couple of small tasks where I’ve needed to toggle the onclick events on a page element. It was surprising how difficult it is to get a straight answer on how to do this. function hide_field() { my_element.onclick = function() { show_field(); }; } function show_field() { my_element.onclick = function() { hide_field(); }; …

Cool Download Page

I’m looking into new JS frameworks for frontend enhancements, and came across MooTools on recommendation from a friend. The framework has lots of cool features and seems pretty simple, but one thing I’m most impressed with is the download page. It acts just like the *nix package managers – allowing to you pick and choose …

RevealCMS backs DIVEintoFLOOD.com

The Flood website redesign has finally launched. On the back-end is the upcoming revealCMS. There are still a few bugs here and there that I want to iron-out before I make it a 1.0 release, but it’s getting there. Overall it’s been a very stable release. The only hiccups we’ve really had to date are …

Award Winning : Davey Awards

I just received word that one of my projects just won a Davey Award for online marketing and email campaigns: Munchkin’s Project Pink: Email a Duck, Raise a Buck! Harley Bergsma at the UXB and I devised this brainchild together. From there he took care of project management and I took care of developing the …

SMARTY: Assigning variables to the header from the body

The problem recently presented itself to me when writing some new functionality for revealCMS: I needed to set some variables to load in the page head, but could only be set after a portion of the body had completed rendering. I wrote a plugin that essentially loads a different stylesheet depending on the input of …

Replacing Substrings using SQL, not PHP

Let’s say you have a problem: A recent DB migration has escaped a lot of quote marks within your fields and now your app is acting funny. Your task is to fix the problem, and do it FAST. Enter the replace() function in MySQL (assumed other RDBMs as well, such as Postgres and MSSQL) UPDATE …

What’s your Fortune?

Here’s a fun little thing you can do for your next site goodie: display your users’ “fortunes” from the command-line interface, CLI, application Fortune. On Fedora, install: % sudo yum install fortune-mod from PHP (fortune.php) <pre> <? passthru(‘fortune’); ?> </pre> I pre-formatted the text because it comes out looking as it does in the CLI. …

Hey there! Come check out all-new content at my new mistercameron.com!