javascript

Safe Wrapper for JavaScript Debugging

Thumbnail image for Safe Wrapper for JavaScript Debugging

I’ve been doing a lot of JavaScript work lately, and while I have been a big Firebug fan/user, I never knew how easy it was to debug JavaScript using console.log() until a buddy at my previous job showed me. The problem with console.log is that if you don’t have the console open you will be [...]

Read the full article →

Fix: jQuery("ul.sf-menu").superfish is not a function

Is your file throwing you a superfish is not a function or some other jQuery(‘blah blah blah’).functionname is not a function? Surround your call to that function with the ready() function to help ensure everything is loaded before the file tries calling non existent functions.

Read the full article →

Open Links to a Different Site in a New Window with Prototype

Using the JavaScript library Prototype I can easily make any external links open in a new window, as well as change the rel=”external” links to open in a target=”_blank” window!

Read the full article →

Change Rel External to Target Blank using Prototype

Use javascript to make XHTML valid rel=”external” act like target=”blank” in a snap using the Prototype JavaScript library.

Read the full article →

From Query String to Cookie with JavaScript

Take a query string and save the values to a cookie using JavaScript. A perfect solution for tracking query string’s values throughout a site that isn’t using any server side scripting.

Read the full article →

JavaScript Cookies – Baking Has Never Been So Easy!

Setting, updating retrieving and deleting cookies with JavaScript is a whole lot easier than I remembered. I’ve not got a quick library of functions available at my fingertips for such actions, wanna see?

Read the full article →

Zip Code, Phone Number and Replacing Empty Fields with Really Easy Validation

While using the Really Easy Validation JavaScript validation library I’ve accumulated a few custom validations that for US phone numbers, US zip codes, Canadian postal codes as well as replacing empty fields or fields that don’t contain a numeric value. Good stuff!

Read the full article →

Thinking About Graceful Degradation and Progressive Enhancement

Graceful degradation is something that really needs to be considered when it comes to server side scripting. What happens to your drop down menu, your fly-out magic or your ajax functionality when JavaScript is no longer enabled?

Read the full article →

Alternating Colors Using Prototype

Using the CSS nth-child selectors I’ve learned how to alternate colors using the Prototype library. Great to apply a style to your tables without having to apply styles by hand or using extra loops/counting with your server side scripting.

Read the full article →

Limit Characters in a Textarea with Prototype

Limit and display the number of characters available in a text area using my little add on script to the Prototype JavaScript library. Very easy to implement, and great feedback to your form filler-outers.

Read the full article →