|
JavaScript and the DOM With CSS in Netscape Don't believe me? Take for example that scrolling text at the top of this page. Let's make that with Netscape Layers.
This is almost exactly the same as the example we did in Tutorial 5. In fact, I copied and pasted the code. The only change I made was to substitute the ID of my current layer for the ID of the layer we used in Tutorial 5. Now, let's replace our Netscape Layer with a CSSP <span> and use the stylesheet syntax and see if the same code works. We need to make sure that the ID of our <span> is the same as our old layer, but other than that we can do whatever we want.:
OK. Go try it out. Does exactly the same thing right? Right. So, if you want to use JavaScript with CSSP in Netscape, use exactly the same methods, properties, and object references that you would use with Netscape Layers (see DHTML Lab VII for a refresher.) Introduction to the Document Object Model In the title of this lesson we mention the "DOM" short for the Document Object Model. DOM is simply another name used that means Object Reference. For now, when it comes to CSS, Netscape and MSIE have a different DOM. We have just covered the DOM for Netscape for CSS and layers. We used the DOM to reference the CSS objects and changed them with JavaScript. For Netscape the DOM has the following structure: In the next lesson we'll find out that Microsoft Internet Explorer has a slightly different Document Object Model. See you at the next learning lab!! |