Advanced Table Configuration

Now we'll look at how to do the same thing without having to reload the page. The method we'll look at only works in Internet Explorer 5+ and Netscape 6+. I usually don't bother with code that doesn't work in version 4 browsers, but we're getting closer to the point where you can force users to have a more recent browser in order to achieve some very interesting effects. All you really have to do is convince your clients (this is easiest when you're working on an intranet).

Before we start coding, there's a little background to cover. We need to know what these methods and tags do:

  • getElementById

  • getElementsByTagName

  • createElement

  • appendChild

  • eval

  • <tbody>

Let's look at all of these.

getElementById

In the early days of ...

Get Advanced JavaScript™: Insights and Innovative Techniques now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.