background
|
|
Linux
Linux Support
A small area on the internet for Linux Support.
More icon

Random
|
|
Up Image
Navigation
Search this Site
Enter your search terms

Site Breadcrumb - You are here
|
Taylor's Dynamic HTML Tutorial
Lesson 3

by Taylor

Page 2 — Syntax: Microsoft vs. Netscape

First, let's get the syntax down for creating dynamic HTML for each of the two browsers. I'm not going to list every single dHTML feature for each browser, only the ones that work the same in both.

Function Navigator Explorer
changing the contents of a region:

object.document.open();
object.document.writeln();
object.document.close();

object.innerHTML
identifying the region: object.name object.id or object.name
position from left of parent: object.left object.style.left
position from top of parent: object.top object.style.top
stack order: object.zIndex object.style.zIndex
visibility of object: object.visibility object.style.visibility
clipping region: object.clip object.style.clip
background image: object.background object.style.backgroundImage
background color: object.bgColor object.style.backgroundColor

As you can see, not one of them matches up. Well OK, object.name matches up, but since you need to use the ID attribute to use CSS on the object, you don't really use that outside of images, links, and forms. So, to do any scripting whatsoever, you have to do a lot of conditionalization through your script. That sounds painful, I know. But it's not always as bad as you'd think.

next page»