![]() |
|
|
What is JavaScript?: Number of people I have met seem to believe, JavaScript is Java. This is ofcourse, a misconception. JavaScript is a Script language developed by Netscape Corporation and implimented in Netscape Navigator Version 2.0 It was also incorporated in Microsoft Internet Explorer Version 3.0 as JScript. Progressively, more functions/event handlers etc were added into the original JavaScript and the improved Languages were & are being released as JavaScript1.1, JavaScript1.2 and so on. The aim is to create more interactive Web Pages. Why do we require JavaScript enabled Browsers?: The catch word here is "inter-active". Simply put, the browser must have the capability to read the script, transform it into the visually appealing effect and/or improve performance and/or include additional utility and/or whatever other functions that the Author of the Web Page intended to produce. To this effect, it is like HTML. Imagine a situation where the browser can't read HTML, instead shows your visitor a screen full of <tags>! The problem, if you wish to call it that, is that JavaScript developement is a continuous process. Therefore, older browsers can not understand newer versions of JavaScript. At the moment both Netscape and IE Version 4.0 or above are fully compatible with JavaScript 1.2 What is an "Event handler"?: "Event handlers" are possibly the most important aspects of JavaScript. These are the ones that "handle" the user initiated actions - for instance, a CLICK action OR MOUSEOVER action. The "event handlers" namely onClick or onMouseover, within the script therefore, instructs the browser "what to do next". What does the term "Function" mean then?: Good question! Unfortunately, "even handlers" by themselves can not execute the user's instruction/s unless the script specifically explains what is the "EVENT" that it has to handle! It is one thing to tell the Browser to react "onClick" or on-whatever, it is another matter actually executing it! So we give "function" calls for every specific event. Each "function" in turn should also have a Name. The event handler then relates to the specific function Name. This name, however, can be anything. For example, if you look at my source codes, I call the "function" - changeon which relates to the event handler onmouseover. Likewise, changeout relates to the event handler onmouseout. As far as the Browser is concerned, it isn't overly concerned about what you name the "function". For all it cares, you can name your function "jughead" or "crazeout" or whatever that fancies you! Only issue is that the particular Function Name must relate back to these Event Handlers - ie, "onmouseover, onmouseout or onclick" etc. Quickly now, will you summarise this for me?: Sure, the 'pert chart' below should explain it. ![]() So, what's this DHTML Stuff then?: DHTML is the newest addition to Client Side web-script language family. The "D" of DHTML stands for Dynamic. Essentially, this gives the author great control over 'Defining' (or 'styling') a web page & it's contents - something HTML by itself couldn't handle. With DHTML, "Styles" can be specified and make the pages more interactive. And throw in some special effects if you like. DHTML basically is a combination of:
One thing to remember is that CSS, is very "SYNTAX" sensative, much more than straight forward HTML. Finally, I should mention that while both the Version 4 Browsers (or higher) support DHTML, unfortunately, specifications as laid out by Microsoft & Netscape aren't quite the same. Therefore, writing DHTML for cross-browser application is quite complicated. What if I have more questions?: Right - you actually have two alternatives, that I can think of:
|