You are here:About>Computing & Technology>JavaScript
About.comJavaScript
From Stephen Chapman,
Your Guide to JavaScript.
FREE Newsletter. Sign Up Now!

Testing Colours

JavaScript irons out browser differences

Testing what colour or background colour part of your page is set to is not as straightforward as it ought to be. When you use JavaScript to look up the colour setting in the stylesheet the format of the value that is returned depends on the browser you are using. For a cross browser solution you need to test for more than one alternative.

Testing Colours
Friday May 16, 2008 | permalink | comments (0)

Mathematical Arrays

JavaScript allows you to add your own classes and objects

If you have several arrays that contain numbers and you want to make working with those arrays easier then take a look at my mathArray class which provides built in ways to manipulate your entire arrays in single commands.

Mathematical Arrays
Thursday May 15, 2008 | permalink | comments (0)

Multiple Requests

You can submit a second Ajax request before the first returns provided you code it the right way.

In all of the preceding Ajax tutorials we have looked at how to use Ajax to make a single request to the server. Because we are making asynchronous requests there is nothing to stop us from sending multiple requests back to the server to retrieve different things all at the same time. In this thirteenth Ajax tutorial we look at how we can set up multiple requests that can work independently of one another.

Multiple Requests
Wednesday May 14, 2008 | permalink | comments (0)

JavaScript Execution Order

Which piece of JavaScript runs when?

To someone experienced with using JavaScript it is really obvious which parts of the code will be run at what stage in the processing of the page source in loading the page and subsequently as a result of interactions by the visitor. To someone who is just starting out it may not be anywhere near as obvious (particularly given that well written JavaScript is kept completely separate from the HTML). In this article we look at the different types of code fragments that can be found within any JavaScript and look at which parts of it get run when.

JavaScript Execution Order
Tuesday May 13, 2008 | permalink | comments (0)

Creating Objects

JavaScript is a prototyping language.

You are not limited to just those objects that JavaScript has already defined or even to extending those objects (which would allow you to create objects that can do just about anything at all). JavaScript also allows you to define objects of your very own to use in your scripts as this twenty first tutorial on Modern Unobtrusive JavaScript demonstrates.

Creating Objects
Monday May 12, 2008 | permalink | comments (0)

Introduction to Form Field Validation

One of the first types of JavaScript you are likely to need to write for yourself is to validate a form.

Before we start looking at how to validate form fields in JavaScript, let's start by looking at what types of form fields that there are and work out which ones will need to be validated. We also need to think about when to validate the fields. This first form field validation tutorial discusses the basics of HTML forms and how and when we would need to validate them with JavaScript. In subsequent tutorials we will look at how to actually apply validation to fields using JavaScript and where to attach out JavaScript to validate the fields at the right times.

Introduction to Form Field Validation
Sunday May 11, 2008 | permalink | comments (0)

Watermarking Images

Don't rely on JavaScript to protect your images!

The only effective way to protect images on your web site is to watermark them. Find out why this method works while the alternative JavaScript and HTML based methods don't.

Watermarking Images
Saturday May 10, 2008 | permalink | comments (0)

Alternatives to "eval"

Some JavaScript commands are so inefficient and so rarely needed that you have to wonder why they are included in JavaScript in the first place.

"eval" is one of the most misused JavaScript commands as well as being one of the least efficient to actually run. Almost every occasion where novice JavaScript programmers use eval it is actually unnecessary as JavaScript itself provides simple efficient ways of avoiding the need to use it in most instances.

Alternatives to "eval"
Friday May 9, 2008 | permalink | comments (0)

What JavaScript Cannot Do

Use the right tools for the job. While it is possible to put screws in with a spanner a screwdriver works far more effectively. Of course that screwdriver wont help much if all you have to use it with are nails.

While there are a great many things that JavaScript can be used for to enhance your web pages and improve your visitors experience with your site, there are also a few things that JavaScript can't do.

What JavaScript Cannot Do
Thursday May 8, 2008 | permalink | comments (0)

Aborting Ajax

Sometimes when waiting for an Ajax response the situation changes so that you no longer need it.

Since Ajax is normally run asynchronously where we don't wait for the response to come back, circumstances may change so that the response is no longer required and we want to abort the request in order to make another more relevant one. In this twelfth Ajax tutorial we look at how to abort an outstanding Ajax request so that the browser can initiate a replacement request using the same code without getting confused between the original and replacement responses.

Aborting Ajax
Wednesday May 7, 2008 | permalink | comments (1)

Email to a Friend

Display Latest Headlines | | | Read Archives

powered by WordPress

Newsletters & RSSEmail to a friendSubmit to Digg
 All Topics | Email Article | | |
Advertising Info | News & Events | Work at About | SiteMap | Reprints | HelpOur Story | Be a Guide
User Agreement | Ethics Policy | Patent Info. | Privacy Policy©2008 About, Inc., A part of The New York Times Company. All rights reserved.