Creative Juices Bo. Co.

Satisfy Your Thirst For Something Refreshing!

A Weird Thing Happened To Me Today When Submitting A Form

Apparently With ColdFusion You Can't Always Rely On form.fieldnames

I've been using ColdFusion for a long, long time and today I came across something that just totally stumped me. When submitting a form, you could always, and I mean ALWAYS, use ColdFusion's "form.fieldnames" field to get a list of all of the names of the submitted form's fields. At least that's what I thought.

read full article...

Where did I go, I do not know.

jQuery Date Navigation Bar

I know it's been awhile since I've posted anything, but I've been a very, very busy bee. Hopefuly, I will get some time to start making some updates to some of my jQuery plug-ins soon, but in the meantime I would like to share something new. It's not fancy, but I required it for some of my client projects as of late and I thought I would share.

read full article...

Lion Server. The Little App That Should, But Doesn't.

I've Given Up on Mac OS X Lion Server 10.7... For Now.

As some of you may know, I run a small development server that I use for my clients. Today I thought I would try to upgrade it to the new 10.7 Lion Server and see if I could get Railo up and running. Well, eight hours and three clean installs later, I have utterly given up. I never got to a point where I could even start playing around with Railo. All of my time was spent trying to get the server up and running properly.

I'm not one to gripe much, but I'm slowly seeing a pattern with Apple that I don't particularly like. I'm not sure if it's management or their programming teams, but the famous Apple "polish" seems to be slowly diminishing on some of their projects. And by some, I don't mean everything. I've upgraded my normal work flow computers to 10.7 and so far I'm not having any issues. But the Server software, well, I can only describe it as a fancy dialog box, that hides a horrendously buggy, poorly thought out and lacking major features piece of software.

read full article...

Problems Combining jQuery Draggable, Droppable and Sortable

Combining jQuery UI Draggable, Droppable and Sortable Functionality

I was having some issues trying to incorporate jQuery UI's droppable, draggable and sortable on a project I'm currently working on. I was receiving some weird errors and I'm still not 100% what was going on, but I broke out the code and simplified it to get it working and I figured I would share.

Essentially, my project calls for a navigation bar that has psuedo-buttons (div's) which need to be dragged upon multiple areas that in turn, need to be sortable. I've illustrated a layout, so you can better understand what I was trying to do (Fig. 1).

read full article...

A Fix for Paul Irish's imagesLoaded jQuery Plug-In

Quick Fix For Getting Called Twice

Paul Irish has a great jQuery plug-in to detect when images are loaded, called imageLoaded. If you've experienced problems detecting cached image loads, then you probably need to check out this great script. I have been experiencing a few quirks with it though. And one of the those seems to be that it gets called twice on occasion. But I think I figured out why.

I think what's happening, is it's firing the load event on both the data uri (for the blank gif) and then for the real image source. To stop this from happening, all we need to do is check the image src before we handle the callback. Here's the fix I came up with:

The Code
(function ($) {
    $.fn.imagesLoaded = function (callback) {
        var elems = this.filter('img'),
            len = elems.length,
            // data uri bypasses webkit log warning (thx doug jones (cjboco))
            blank = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==";
        elems.bind('load', function () {
            // check image src to prevent firing twice (thx doug jones (cjboco))
            if (--len <= 0 && this.src !== blank) {
                callback.call(elems, this);
            }
        }).each(function () {
            // cached images don't fire load sometimes, so we reset src.
            if (this.complete || this.complete === undefined) {
                var src = this.src;
                // webkit hack from http://groups.google.com/group/jquery-dev/browse_thread/thread/eee6ab7b2da50e1f
                this.src = blank;
                this.src = src;
            }
        });
    };
}(jQuery));

By the way, who is that cool guy Doug Jones that recommended the data uri in the first place!

Edit: I merged the src check for the callback with the len check for simplicity. Paul has also updated his version as well.

read full article...
Page: 12345678