|
DHTML Overview:
Introduction to DHTML NOTE: We assume that you are already familiar with the subject matter contained in the HTML Learning Labs and the Javascript Learning Labs. DHTML! We've all heard a ton of stuff about it in Internet Magazines, on the 'Net, and on TV. But what the heck is it?! Now scroll back to the top of the page. More Words Did you see "More text" show up above the scrolling text? Try doing that with plain old HTML. Now, have you ever dragged icons around on your desktop? Go back to the top of this page and drag those new words around in the same way. Cool huh? What does Cross Browser mean? The two main browsers in use today are built to read and use certain types of languages and syntax. Some of the parts of these languages and synataxes are contained in BOTH browsers...this is CROSS BROWSER SUPPORT. JavaScript, JScript: JavaScipt 1.1 was invented by Netscape Corporation to provide web pages with some interactive programming abilities. With the advent of Internet Explorer 4.0, Microsoft successfully cloned JavaScipt and called it JScript. Now JavaScript 1.1 which is the same as JScript runs on both browsers. Netscape added features and called it JavaScript 1.2 and then added more features and called it JavaScript 1.3. All the while, Microsoft added the same features and lumped it all in to what they call DHTML. yuk. Cascading Style Sheets Level 1 (CSS1): CSS1 is the first step that the browser makers took in DHTML. What CSS1 allows you to do is apply a given set of formatting features to a block of text (i.e. all bold text is also red.) Don't let the fancey technical name scare you. It is simply some new HTML tags with some new attributes which can be grouped together. Cascading Style Sheets Positioning (CSSP): CSSP is what lets us place blocks of information (text, images, etc.) at a particular position on the page...most often defined in pixels. CSSP, along with JavaScript, also allows us to move those CSSP items around on the page while the user is looking at it. We can even make it appear or disappear! Again, don't let the name run you off. The only difference between CSS1 and CSSP are a few properties or attributes of the same tags in CSS1. Document Object Model: The Document Object Model is basically the object heirarchy for accessing and scripting CSS objects. It seems to me to just be a part of Javascript or Javascript is a part of it. I think that the document object model is just another more politically correct name for what used to be called Javascript but since "javascript" was a word invented and copyrighted by Netscape every now just calls it the Document Object Model. Dynamic CSS: This is currently only supported by Microsoft Internet Explorer. Dynamic CSS allows us to change all of the CSS properties dynamically with javascript. Netscape currently only allows for positioning properties to be changed dynamically.To get same kind of control with Netscape we will have to use layers and some other tricks. Layers: Layers are proprietary to Netscape Navigator 4.x (Communicator.) This means that at this time Layers only work in Netscape Navigator 4.x. I warned you a minute ago that there would be compatibility issues with DHTML, and this is only the beginning. Layers offer nearly all of the features of CSS1 and CSSP, and some features only available with Layers. JSS: Javascript Style Sheets are just like CSS with a slightly differnet syntax. This is only supported by Netscape. We will not spend much time on JSS since we can accomplish most anything we need with CSS or Layers. Below is a venn diagram of the browser support for these "languages": ![]() None of this vocabulary actually matters, it's all just JavaScript and HTML to me!! These corporations and organizations have simply chosen to name each addition to the functionality to their browser and features as a marketing gimick, and nothing more. All you need to know is which html and JavaScript works on each browser and that's it. Don't get caught up in these marketing vocabulary terms. Now that we know the vocabulary of DHTML, who cares? It all means the same thing. We can make cool stuff that does cool new things! So, let's get started. I'm going to assume that you know HTML and JavaScript pretty well, so if you aren't comfortable if JavaScript, go to the UserActive HTML or JavaScript Learning Labs and brush up. I'll see you in the next tutorial. |