Mar. 6, 2010 at 1:33pmFlash's Last Stand?

The Movement Beyond Flying Text

This article about Virgin America abandoning Flash for it's website popped up late last week and it seems fitting since there seems to be a lot of discussion around Flash and mobile operating systems - specifically Apple and the iPhone and iPad. Actually there has always been a lot of discussion around the effectiveness of Flash and people usually fall into two opposing camps - yeah, big surprise I know. 

My take is that Flash is a good tool when used in applications that could be made way more difficult to accomplish without it. I believe it is a good standard platform for video and some specialty drawing or gaming applications - but that is about it. 
Read more →

Oct. 23, 2009 at 11:42amStackOverflow DevDay Seattle Conference

On Wednesday, I had the pleasure to attend and volunteer for the StackOverflow DevDays conference in Seattle. StackOverflow is a programming Q&A site, much like Expert's Exchange except without the nagging to register. It boasts over 1 million page views per day and something like 20 thousand active users.

There were many interesting topics covered, from ASP.NET to Qt, and there's a few new ideas that I want to try out now.
Read more →

Jul. 23, 2009 at 9:38amjQuery 1.3 Closest Function

A quick look at an awesome function

The jQuery function $.closest() is a particularly handy function when doing DOM manipulation. I'll discuss it's power along with an example of it's use.

Read more →

Jul. 21, 2009 at 10:36amjQuery UI Live

Make jQuery UI Widgets Attach Dynamically

jQuery has some awesome widgets, but all of them need to be attached after an element is added to the page. With some quick changes, your widget can be added dynamically to any element using $.live(). Read more →

Jul. 17, 2009 at 3:34pmA New Take on Default Input Values

JQuery Saves The Day

From time to time, we need to put default values into input fields, and have those values go away when a user clicks on that field. There are a few ways to make that happen. I was working on a new project, and came up with a quick way to setup any number of default-able fields. There are two simple steps.

1) Add class="default" and value="Some default text..." to your field. The value can be anything.
2) Include this little jquery function on the page.

$(function() {
    $('.default').each(function () {
        var default_val = $(this).val();

        $(this).focus(
            function() {
                if(default_val == $(this).val()) {
                    $(this).val('');
                }
            }
        ).blur(
            function() {
                if('' == $(this).val()) {
                    $(this).val(default_val);
                }
            }
        );
    });
});

View a demo >

May. 8, 2009 at 12:41pmjQuery Caching Convention

A Way To Name Your jQuery Objects

This blog entry shows you how to cache a jQuery object into a variable for future use. I present a naming convention that I have been using that visually separates jQuery objects from other JavaScript variables. Read more →

Apr. 2, 2009 at 12:39pmThe Multiple Interval JavaScript Problem

The Phantom Menace

Using intervals in JavaScript for pausing/unpausing events can sometimes cause a phantom interval which you can't control. Learn how to stop that phantom in it's tracks with one line of code. Read more →

Mar. 11, 2009 at 12:59pmjQuery.live()

A new way to setup events

jQuery 1.3 has added support for live events, and it makes developing a breeze. Before, you'd have to wait until the page is completely loaded to add events to elements. And if you added new elements to the page, they would need special attention to have events added. Not anymore! Read more →

Feb. 9, 2009 at 10:00amCSS Animations in WebKit

See what's new in the latest build...

WebKit, the muscle behind both Safari and Google Chrome has recently added CSS animation support to its nightly build. While a long way from being supported in any widely used browser, this does give a bit of a preview for what we can expect in the future. It's hard to say whether these new animations will be widely adopted, and if they simply become the new "blink tags" of the modern web world.

Read more →

Jan. 22, 2009 at 11:21amGiving Actions to Classes

Actions without JavaScript!

A concept of how to define actions using classes. Best part is, there's no need to know JavaScript!

Read more →

Jan. 19, 2009 at 2:35pmStyling Inputs is Hard

jQuery to the rescue!

Internet Explorer 6 is just too old to support all the fun CSS tricks of the modern web. The Input Type selector is one of the most problematic. I suggest a quick jQuery function to get around this.

Read more →

Oct. 27, 2008 at 12:01pmHow to use jQuery in a Prototype world

jQuery Namespace Workarounds

Prototype and jQuery conflict over the $ function. In the entry, I will show you how you can start to include jQuery code in the an environment that is already Prototype heavy.  Read more →

Sep. 25, 2008 at 4:43pmJSCommandlet Released

JavaScript Development Made Easier

We're happy to announce a new bookmarklet called JSCommandlet. It is a JavaScript console developed for use within SiteCrafting. If you do any kind of JavaScript development, especially working with Internet Explorer, JSCommandlet is for you.

Read more →

Aug. 15, 2008 at 11:24amWindow.Name experiment

Does anyone use it yet?

I am starting an experiment to see whether the recent blog chatter about window.name is actually being used. Included is some JavaScript that you can put in GreaseMonkey to help me in my search. Read more →

Jul. 22, 2008 at 4:41pmOnload Collisions and How to Fix them

Harry Potter and the Onload Collisions

There is no other variable more fought over then the coveted window.onload. Its job is to run a function after a page has been loaded. The problem is that there is only one variable, and therefore only one function can run. Once you have set this you would think you are in the clear. That is until another script comes in and overwrites onload.

But all can be made well in JavaScript land once one of four choices is made. I give four ways to get around this problem, and suggest a way for modern browsers to be rid of this problem once and for all.
Read more →

Mar. 31, 2008 at 11:40amGot API?

An API reference does a method's body good...

gotAPI.com is one of the most useful online resources I've come across, primarily because it places resources spread all over the internet into one simple site. I've been using this for quite some time, and have for the most part I have taken its usefulness for granted. Then it occurred to me that I might not be the only one that could find this tool useful (I know, it was a big 'DUH!' moment). So now I will share this gem with others...

Read more →

Feb. 14, 2008 at 4:29pmTouch the Vote

Rock it as well, if you must

This time of year you either get hooked or get sick of everything politics. That's right, it's a Presidential election season and the 24-hour news cable channels are firing out tons of info both via your TV and online. Some worthy strides in web development practices have also come about on one news site in particular that may help political junkies get their fix anytime, anywhere.

Read more →

Jan. 4, 2008 at 3:21pmAnonymous Recursion with JavaScript

A new way of solving an old problem

A nice feature of JavaScript is that functions are objects. As such, they do not need a name if they are used right away. But what if you need a short anonymous recursive function? arguments.callee becomes your new best friend.

Read more →

Sep. 12, 2007 at 4:52pmAJAX & IE Caching Issues

I've been working on a project that involves using the jQuery javascript library and the Ajax methods. I've been happily using the Ajax jQuery.get() method to handle simple calls, such as a link that allows a user to view a list of words based on their selection, getting the contents of a tab when the user selects a tab, and finally getting the current weather after the person enters a new zip code, which is then saved to the database.

For the last operation, I got the JavaScript working great on Firefox and I thought it was working in Internet Explorer. However, after some testing, I noticed that the same weather data was being returned, even after a new zip code on the opposite coast was selected. Mmmm, I was rather baffled, especially since I've been using this jQuery.get() on the other functions, and encountered no problems like this.

Read more →

Apr. 9, 2007 at 4:36pmPrinting without the Dialog

One day, one of our clients came to us with a very unusual request - they wanted to be able to print something directly from the browser, but without displaying the usual print dialog box. I don't have much time in the webdev business, but I've never heard of this kind of request, and neither had anyone else in the office.
Read more →

Jan. 19, 2007 at 10:03amPrototype Documentation

Finally...

One of the most popular javascript libraries, Prototype, has finally released a decent set of documentation. I'm really pleased, because it was a little difficult to work with not knowing what was available, and how to use all the tools.

Their website is very simple and easy to use, and will quickly become one of my most visited sites. If you haven't used Prototype, I highly reccomend taking a look at its features. It makes javascript development very fast and simple, even for complex problems. I've used it to great success. I don't know how it matches up with some other javascript libraries yet, but I'm planning on reviewing all of them.

Dec. 13, 2006 at 4:12pmThe <select> Tag and innerHTML

While I was working on a recent project, I ran into a weird bug with IE 6. I was using some AJAX to dynamically fill a <select> tag with options depending on what element was selected from the tag's parent. It worked fine, and quite seamlessly in Firefox, but broke for inexplicable reasons in IE. Read more →

Dec. 11, 2006 at 4:36pmNames 1, IDs 0

I never enjoy finding quirks in something so seemingly simple when I'm coding but it certainly happens. The following is a tale of how I ran into trouble with a couple attributes that should be worlds apart.

Read more →

Nov. 1, 2006 at 9:16amBulletproof HTML Critique

I ran across a neat article from Sitepoint via Stylegala that you all should read on how to make your HTML 'perfect'. In the world of design, the concept of perfect is non-existant. There is no solution that will work for solving every problem, and there are exceptions to every rule. This article is no different. Read the full article, and then check out my comments.
Read more →