Page 169 - DCAP202_Fundamentals of Web Programming
P. 169

Fundamentals of Web Programming




                    Notes          14.1 DHTML Basic

                                   DHTML is not a language itself, but rather a combination of:
                                      HTML 4.0 (or XHTML 1.0)

                                      JavaScript — the Web’s standard scripting language
                                      Cascading Style Sheets (CSS) — styles dictated outside a document’s content
                                      Document Object Model (DOM) — a means of accessing a document’s individual elements
                                   Dynamic HTML (DHTML) is a set of innovative features originally  introduced in Microsoft
                                   Internet Explorer 4.0. By enabling authors to dynamically change the rendering and content of
                                   a Web page as the user interacts with it, DHTML enables authors to create visually compelling
                                   Web sites without  the overhead of server-side programs or complicated sets of controls  to
                                   achieve special effects.
                                   With DHTML, you can easily add effects to your pages that previously were difficult to achieve.


                                          Example: you can:
                                         Hide content until a given time elapses or the user interacts with the page.
                                         Animate text and images in your document, independently moving each element
                                          from any starting point to any ending point, following a predetermined path or one
                                          chosen by the user.
                                         Embed a ticker that automatically refreshes its content with the latest news, stock
                                          quotes, or other data.
                                         Use a form to capture user input, and then instantly process and respond to that data.
                                   DHTML achieves these  effects by  modifying the  in-memory representation of the  current
                                   document and automatically reformatting it to show changes. It does not reload the document,
                                   load a new document, or require a distant server to generate new content. Instead, it uses the
                                   user’s computer to calculate and carry out changes. This means a user does not wait for text and
                                   data to complete time-consuming round trips to and from a server before seeing the results.
                                   Furthermore, DHTML does not  require additional  support from applications or embedded
                                   controls to make changes. Typically, DHTML documents are self-contained, using styles and a
                                   script to process user input and directly manipulate the HTML elements, attributes, styles, and
                                   text of the document.




                                     Notes  In  short, DHTML  eliminates  the shortcomings of static  pages.  You can  create
                                     innovative  Web sites,  on the  Internet  or  on  an intranet, without  having to  sacrifice
                                     performance for interactivity. Not only does DHTML enhance the user’s perception of
                                     your documents, it also improves server performance by reducing requests to the server.

                                   14.1.1 DHTML Technologies

                                   Speaking in true sense there is nothing dynamic in DHTML but enclosing technologies such as
                                   CSS, JavaScript, DOM and the static markup language it becomes dynamic.
                                   JavaScript: Whether we call it JavaScript, Jscript, or ECMAScript, it is the most common language
                                   used today for client-side scripting. The main reason for this JavaScript comes with virtually
                                   every browser.




          162                               LOVELY PROFESSIONAL UNIVERSITY
   164   165   166   167   168   169   170   171   172   173   174