1. Home
  2. Computing & Technology
  3. JavaScript

Combo Boxes

HTML doesn't provide a combo box in its form field types. The closest it offers is a regular input field where you can type whatever value you want but can't select a common value from a list. Well with JavaScript we can make our own.

Unusual Calculators

Stephen's JavaScript Blog

Functions and Methods

Wednesday February 10, 2010
In JavaScript all functions are methods. The difference between a function and a method in JavaScript is mostly a matter of terminology. If you are using a procedural approach you will call them functions and if you are using an object oriented approach then you'll call them methods. While functions and methods are actually different from one another, in JavaScript there is no real distinction because all stand alone functions are really methods of the window object. In this eight "Learn Modern JavaScript" tutorial we look at the main ways to define a function or method.

Functions and Methods

Getting Rid of document.write

Tuesday February 9, 2010
The document.write statement was a big part of being able to use JavaScript to update web pages back when JavaScript was first created. Modern web browsers provide much better less obtrusive ways of doing the same updates. Here are some instructions on how you can update your web pages to replace the document.write statements with innerHTML calls instead which will allow you to consolidate all your scripts to the bottom of the page instead of having scripts scattered throughout the HTML.

Getting Rid of document.write

The Bad Parts of JavaScript

Monday February 8, 2010
JavaScript includes a number of constructs that have either been superseded by something better or which seemed like a good idea to those who created JavaScript in the first place but which have turned out to be more trouble than they are worth. Here are some of the JavaScript constructs you should avoid as well as some that can be problematic if not used properly (so you should avoid them where possible as well).

The Bad Parts of JavaScript

Back References

Sunday February 7, 2010
The fifteenth tutorial on Regular Expressions introduces Back References - this is a way to refer back to a previous section of the string that you have already matched to the pattern. Any section of the string that is matched by a group is automatically added to an array of back references.

Back References
Discuss
Readers Respond
Ways I Have Seen JavaScript Misused And How I Would Have Done it Differently
Add Your Response

Recent Blog Posts
Explore JavaScript
About.com Special Features

Vote in the Reader's Choice Awards

What are the best instant messengers, apps, and editors? You decide, in our 2010 technology awards program. More >

iPad Central

Is Apple's new tablet computer impractical, a must-have -- or both? We'll help you figure it out. More >

  1. Home
  2. Computing & Technology
  3. JavaScript

©2010 About.com, a part of The New York Times Company.

All rights reserved.