Implementing Interfaces in JavaScript

In Object-Oriented languages an interface defines a set of methods which a Class must include in order to implement the interface (otherwise, if the Class is missing the required methods, the code will fail and the interface will throw an …more

Implementing Interfaces in JavaScript
Regular Expression Basics

Regular Expressions are a powerful utility within the JavaScript language. Essentially it allows you to search and manipulate strings of text with both simple and complex patterns.

For example, you’ll normally find a lot of form validation is done using Regular …more

Regular Expression Basics
Mixin Classes as a way to reuse JavaScript code

This is a useful example of how you can augment a Class to have a particular method but not by using strict inheritance or by duplicating the relevant code for each Class you have. I came across this technique (known …more

Mixin Classes as a way to reuse JavaScript code
Grab HTML fragment with AJAX

If you’re new to AJAX you may be wondering how you can pull in just a single element from another HTML page (as calling an HTML page with AJAX pulls the entire HTML content in as a String).

It has also …more

Grab HTML fragment with AJAX
Cross Browser JavaScript DOMContentLoaded

This post shows you how you can call your JavaScript functions once the Document Object Model is ready (which is a lot faster than waiting for the page to finishing loading when using window.onload).

The following code is an amalgamation of …more

Cross Browser JavaScript DOMContentLoaded
Next