Tutorial Category Archive

Tutorials rock, it’s like…they teach you stuff.

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?

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!

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.

Special Characters in Custom CMSs and Forms


Encoding special characters can be tricky, especially when you have clients with custom CMSs who like to copy and paste all the em dashes and trademark symbols from word into your web based text area. Now I have found a solution for my needs!

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.

Multiple and Dynamic Variable Assignment in PHP


Assigning variables is a core part of any PHP script but there’s many different ways to work with assignments. Assign multiple variables on one line, dynamic variable and references can change the way you think about using variables.

Evolving Styles: Add, Change Remove Classes with Prototype


Using the Prototype JavaScript library it’s easy to apply, add or remove a class to and from an element. Just few simple lines of JavaScript and you have a whole new interactivity at your fingertips.

First, Last, Active and Only List Styles With Prototype


It’s easier than ever to apply the classes ‘first, ‘last’, and ‘active’ to your navigation lists using the Prototype Javascript library. Of course this will only work for a JavaScript enabled environment but if you have a list that is out of control, or already requires Javascript, this might be your best solution.

Simple Hide and Show with Prototype


Hiding and showing elements using Prototype is super easy. We’ll walk through from the most basic hid and show functionality to slightly more complex functionality where you can change the toggle’s text or image.

Event Observe and Event Listeners with Prototype


My most common mistake with Prototype is not defining elements before i call them with my JavaScript. Using event listeners I can ensure I don’t call on an element until it, or the whole page is loaded, amongst many other reasons.