Articles Index
Browser Window Size and Position
Depending on the browser type, screen resolution and other settings, the size of a browser window may vary considerably. The solution? A collection of JavaScript functions that return information about the size and position of the browser window. This article explains how they work.
JavaScript 101
Want to use JavaScript on your web pages? There are several alternatives.
Free JavaScript Download
You don't have to pay for JavaScript, and you don't have to write it yourself either -- unless you want to. We'll help you understand your options for finding, downloading, and customizing free JavaScript code.
JavaScript By Example
In this example we look at where and how you should define variables in JavaScript.
JavaScript Form Processing
This is a complete example of all the HTML and JavaScript required to unobtrusively attach JavaScript validations to a form. It also includes the code to validate the HTML 5 required and pattern attributes across all browsers.
JavaScript Form Processing
Even though older browsers don't support the HTML5 pattern attribute for form fields we can implement it ourselves in JavaScript.
JavaScript Form Processing
Even though older browsers don't support the HTML5 required attribute for form fields we can implement it ourselves in JavaScript.
JavaScript Form Processing
Once our form validation detects an error we need an unobtrusive way to display the error.
JavaScript Form Processing
When we set up unobtrusive form field validation we can easily share validation between fields that need to validate the same way.
JavaScript Form Processing
The modern unobtrusive way of attaching JavaScript to validate a form in your web page doesn't require any changes to the HTML of the form.
JavaScript Form Processing
Changes to both JavaScript and HTML have affected the way we should be using JavaScript to validate our forms and will affect it further in the future.
Variables, Functions, Properties and Methods
While these four terms have distinct meanings in some languages, things are not as clear cut in JavaScript.
JavaScript By Example
Regular Expressions provide pattern matching functionality for advanced string manipulation.
Learn Modern Unobtrusive JavaScript
You can add properties and methods to existing JavaScript objects at any time.
JavaScript By Example
Unlike other languages, optional parameters in JavaScript are handled inside the function and not in the definition of the arguments.
JavaScript By Example
Not all browsers allow events to be attached in the same way. This example shows one way to combine them in an efficient manner.
Null and Undefined
Both null and undefined in JavaScript do not always behave as you might expect them to.
JavaScript Testing
Which order you run your tests in will affect how likely it is that you will need to rerun lots of tests if one fails.
Object Oriented JavaScript
JavaScript is a prototyping language rather than an object oriented one but most of what you can do with an object oriented language can be done with JavaScript.
JavaScript By Example
A series of example JavaScript that shows you how to write JavaScript.
JavaScript By Example
By using apply or call we can borrow the constructor function from a different object to create a part of a new object for us.
JavaScript By Example
We don't need a special constructor function to be able to create an object, an ordinary function can be used instead provided we return the created object.
JavaScript By Example
Since JavaScript doesn't use classes we need to define singletons a little differently from other languages. Let's look at it as when creating multiple objects from the same base object actually just create aliases for a single object instead.
JavaScript By Example
A slightly different approach to inheritance is needed when you want to have more than one parent object.
JavaScript By Example
The most efficient time to define which way we want cross browser processing to work is the first time it is needed.
