![]() |
By David Gardner (11/09/99)
|
|
netscape internet explorer dynamic content moving elements cross browser resources |
What is DHTML exactly? That's a great question, one that I admit I had a lot of trouble finding a straight answer to. I remember seeing a posting on a JavaScript newsgroup that attempted to answer this question with the reply:
"DHTML is the combination of HTML and JavaScript."I said to myself "Isn't that just a webpage with JavaScript on it then?" I was confused, to say the least. After shuffling through hundreds of search results on search engines for that elusive answer to my question, I still could not find it. So I thought, what the heck, I'll learn DHTML first, then figure out what it is! Now that I'm somewhat a DHTML programmer, I think I'm ready to present you with a decent one-line definition to the word DHTML:
"DHTML is the combination of several built-in browser features in fourth generation browsers that enable a web page to be more dynamic."You see, DHTML is NOT a scripting language (like JavaScript), but merely a browser feature- or enhancement- that gives your browser the ability to be dynamic. What you really want to learn is not DHTML itself, but rather, the syntax needed to use DHTML. Before anything else, you may want to quickly visit Dynamic Drive to see what this language is capable of. Like I said, DHTML is a collection of features that together, enable your web page to be dynamic. I think its important now to define just what the creators of DHTML meant when they say "dynamic". "Dynamic" is defined as the ability of the browser to alter a web page's look and style after the document has loaded. I remember when I was learning JavaScript, I was taught that you could use the document.write() method of JavaScript to create webpages on the fly. For example:
<script> "Not bad", I remember saying to myself. But what if I wanted to create content not only on the fly, but on demand? Naive I was then, I tried doing just that, by nesting the above code in a function, and calling it via a form button: <input type="button" onClick="writeconent()" value="text">
Pressing the button was nothing short of a big disappointment. My entire web page was erased, and I was left with only the text the function produced.
About the author |
![]() |
|