- basic scripting -

       Last Words
.   .   .

So far we've scripted a sliding menu and a scrolling marquee Intrepid Digital logo. By now, you should know how to dHTML-ize an ordinary boring HTML page. To get all of this down, I recommend doing many short exercises on your own. Work with it, until it all makes sense.

The next thing to talk about is Netscape flaws. You should figure out ways around these after playing around for a while. A couple of problems:

Problem: If you want to have a box, width=200, height=200, bgcolor=blue, with no text in it. Microsoft will do it, but Netscape only puts the background color behind text or anything else in the span. So if the width is 700, and you have the letter "a" in the span tag, there will only be a background behind the letter "a".

Fix it: Add a table to the inside of the span tag, and have one cell that is the same width of the span tag. Then, don't specify the bgcolor in the span tag, but rather in the <td> tag.

Problem: Let's say you want to change the bgcolor of a span tag. Netscape won't read document.object.background. Netscape will only change the bgColor of an object if that object is a <layer>.

Fix it: Use a script. Detect the browser, and then do a document.writeln. do: document.writeln(""); for Microsoft and document.writeln(""); for Netscape.

The saying is true: "It's the tricky and creative dHTML programmer that gets the gold." Actually, that's not a saying, but it is true. You can practically create anything you want with dHTML you want. You've just got to find how you're going to do it, and then work hard and do it.

home >>

.   .   .

  1. Introduction
  2. What, Exactly, is it?
  3. The [object]
  4. Detecting Browsers
  5. Accessing Properties
  6. Making a Script
  7. Making the Script in Netscape
  8. What to Change?
  9. Creating a Menu
  10. Scripting the Menu
  11. The Netscape Menu
  12. Last Words