Programming on the Client Side: Javascript/Dynamic HTML How

Total Page:16

File Type:pdf, Size:1020Kb

Programming on the Client Side: Javascript/Dynamic HTML How Return to Client Side (The Browser) So far we have been developing Programming on the Client Side: Static Web pages JavaScript/Dynamic HTML • Recap —- Perl/CGI: 569 Static Pages: 570 Server Side • Very nice. Essential to do hard work processing on the Internet (PHP similar) • • Often Adequate for the task in hand – Search Engine • Often useful and – Log Usage • – Gather Data/Stats Often entertaining or informative. • – Interface to Databases – Many more suitable applications .... !! !! "" "" ! ! " " Back Back Close Close Making Web Pages Dynamic Other Typical Uses of Dynamic Web Page Can replace some (but not all) CGI functionality? Detecting which browser accesses page • Customising HTML for browsers E.g. HTML form: • User Customised HTML Users enter data and submit it to the server • • 571 Opening new browser windows for new links 572 a CGI script is used to verify and validate that data. • • Messages and confirmations, Alerts, Status Bar passes data across the network — slow. • • Writing to Frames • Rollover Buttons, Moving Images How much more interactive could a site • Multiple pages in a single Download be if data were checked by the browser and • ..... Many More any error messages originated locally? • !! !! "" "" ! ! " " Back Back Close Close Some More Definitions: Dynamic HTML and Document Object The Document Object Model (DOM) Model DOM: Before delving into the programming there are two more topics to The key element of DHTML is probably the document object introduce. • model. The Document Object Model (DOM) : 573 DOM makes everything on the page into an object 574 • Scripts can only manipulate objects on the page because of Elements can be manipulated by programmed scripts. • DOM • This was developed by the World Wide Web Consortium (W3C) • Limited Cross-browser Support — neither of the big players • yet adheres fully to it. Dynamic HTML (DHTML) : A combination of content formatted using HTML, cascading • style sheets, a scripting language and the DOM. !! !! "" "" ! ! " " Back Back Close Close DOM of an HTML Document Example HTML DOM The DOM model of an HTML document is a hierarchical structure The relationship between some HTML code and the DOM which might reasonably be represented as a tree. <html> Does NOT imply that DOM software must manipulate the <head> • document in a hierarchical manner, <title>TITLE OF PAGE</title> 575 576 </head> It is simply a representation. • <body> <p>Some text...</p> <ul> <li>First <li>Second </ul> </body> </html> !! !! "" "" ! ! " " Back Back Close Close Example HTML DOM (Cont.) JavaScript JavaScript is NOT JAVA: The only similarity between the two languages is in their names!!! • Basic idea : a client-side browser language not as complicated as • 577 Java. 578 JavaScript and JScript Meant to be implementations of the same thing. • Not exactly the SAME!!!! • The DOM models, but does not implement: Objects that comprise a document • !! !! Semantics, behaviour and attributes of those objects "" "" • Relationships between those objects ! ! • " " Back Back Close Close What is JavaScript and What is it Used For? Pros and Cons of JavaScript JavaScript is: Advantages: Wide browser support i.e. Most Browsers speak a dialect. A fairly simple language • • Easy access to document objects and their manipulation Only suitable for fairly simple tasks • • No long download times w.r.t java or graphic animations Best suited to tasks which run for a short time 579 • 580 • No Plug-in support required Most commonly used to manipulate the pieces of the document • • Relatively Secure object model. • Disadvantages: Not standard support for Javascript across browsers esp. DOM • Web page useless if script does not work!! • Javascript may be disabled by browser reading HTML file no • control over this !! !! JavaScripts can run slowly "" • "" ! The version of JavaScript that was used as the basis of the ECMA ! " Script standard was 1.1. Therefore everything that is written using " Back JavaScript 1.1 should comply with the standard. Back Close Close Learning JavaScript Borrowing Code First Steps in JavaScript As with HTML (and Perl): Running Javascript A lot of code on Web. • 581 JavaScript can be run on some file and Web servers 582 All the JavaScript that your browser encounters is freely available • • MOST COMMONLY: front-ends for Web pages. to you. • – Part of HTML document (as we will see very soon) Therefore: – So View Source, or You do not compile it like other programs, Java, C, Pascal – Save as ... HTML will give you access to lots of Examples. • It is an interpreted language: It is a script • To Use: Simply embed JavaScript in you HTML web page One of the best resources on the web is The JavaScript Source at • http://javascript.internet.com !! !! "" "" ! ! " " Back Back Close Close A Simple Example 1 — Hello World The key points of JavaScript Programs The script that follows could hardly be easier. The JavaScript program is contained between the <script> .... </script> We’ll list the code first then explain what’s going on. • • The language attribute must be set to "javascript" i.e <html> • <head> <script language="javascript"> <title> Hello World JavaScript</title> 583 584 </head> JavaScript programs contain variables, objects and functions. • <body > Each line of code is terminated by a semi-colon; <script language="javascript"> • Blocks of code must be surrounded by a pair of curly brackets. A block of code • var str = "Hello World"; is a set of instructions that are to be executed together as a unit. This might be because they are optional and dependent upon a boolean condition or because window.alert(str); they are to be executed repeatedly; Functions have parameters which are passed inside parenthesis; document.write("<h1>" + str + "</h1>"); • Variables are declared using the keyword var; </script> • !! Scripts require neither a main function nor an exit condition. !! • "" Functions may be used. "" </body> ! • ! </html> " " Back Back Close Close Our First Hello World Example A Simple Example — Hello World with a Function Specifically for the Hello World Program: Let us now see how we use use funtions in JavaScript We create a variable str and store the string "Hello World" in Here wee also note that • it. You may freely write JavaScript in any place in your Web page. • We create an alert window with the message "Hello World". • 585 However if you wish to trigger actions from certain events you 586 The window object is used and we call the alert method • may wish to put your JavaScript in functions in the Head section (function) of this object. of the document. !! !! "" "" Figure 29: Hello World JavaScript Example ! ! We write() to the document model some HTML. " " • Back Back Close Close Hello World with a Function Hello World with a Function — Explanation The Hello World program called from a function is as follows: The operation of the program is essentially the same as the first version except that <html> We write a function <head> • <script language="javascript"> 587 588 init() function init(){ var str = "Hello World"; to do the job. window.alert(str); We call the function when the Web page loads with the • document.write("<h1>" + str + "</h1>"); onLoad="init()" } </script> attribute in the body tag. </head> !! !! <body onLoad="init()"> "" "" ! ! </body> </html> " " Back Back Close Close More Functions Popup Browser Information Example We can add more functions that get called on different events: The program also introduces some more objects and some useful applications of JavaScript: We call a function popup() when the Web page loads • We call a function farewell() when the page is unloaded: The navigator contains • • 589 data about the browser being 590 – The onUnLoad="farewell()" attribute is set. used The program finds the • version of the application appVersion and the Safari Version userAgent(). This information is displayed • in a pop up alert When you leave the Web !! • !! "" page or Refresh the page an "" alert Explorer Version ! different is brought ! " up " Back Back Close Close Popup Browser Information Example Popup Browser Information Example Code The full code for this example is: <html> <head> <script language="javascript"> 591 function popup(){ 592 var major = parseInt(navigator.appVersion); var minor = parseFloat(navigator.appVersion); var agent = navigator.userAgent.toLowerCase(); document.write("<h1>Details in Popup</h1>"); window.alert(agent + " " + major); } Figure 30: Browser Version Page Exit JavaScript Example (Internet function farewell(){ window.alert("Farewell and thanks for visiting"); Explorer Display Shown) } </script> !! </head> !! "" "" ! <body onLoad="popup()" onUnLoad="farewell()"> ! </body> " </html> " Back Back Close Close More Browser Information A Second Browser Information Example So far our examples have done everything inside JavaScript The program achieves a similar task as the previous example but in environments: a completely different way: You can also mix HTML and JavaScript The program an HTML TABLE (see later) to a Browser with the • • Browser’s details: You can also access JavaScript variables in the HTML 593 594 • Figure 31: Browser Version 2 JavaScript Example (Explorer) !! !! "" "" ! ! " " Back Back Close Close Browser Information Example 2: Javascript and HTML Mix Browser Information Example 2: HTML HEAD <HEAD> <SCRIPT> <!-- This script and many more are available free online at --> 595 596 Figure 32: Browser Version 2 JavaScript Example (Safari) <!-- The JavaScript Source!! http://javascript.internet.com --> <!-- Begin The program use
Recommended publications
  • Dynamic Web Pages with the Embedded Web Server
    Dynamic Web Pages With The Embedded Web Server The Digi-Geek’s AJAX Workbook (NET+OS, XML, & JavaScript) Version 1.0 5/4/2011 Page 1 Copyright Digi International, 2011 Table of Contents Chapter 1 - How to Use this Guide ............................................................................................................... 5 Prerequisites – If You Can Ping, You Can Use This Thing! ..................................................................... 5 Getting Help with TCP/IP and Wi-Fi Setup ............................................................................................ 5 The Study Guide or the Short Cut? ....................................................................................................... 5 C Code ................................................................................................................................................... 6 HTML Code ............................................................................................................................................ 6 XML File ................................................................................................................................................. 6 Provide us with Your Feedback ............................................................................................................. 6 Chapter 2 - The Server-Client Relationship ................................................................................................... 7 Example – An Analogy for a Normal HTML page .................................................................................
    [Show full text]
  • Effects and Opportunities of Native Code Extensions For
    Effects and Opportunities of Native Code Extensions for Computationally Demanding Web Applications DISSERTATION zur Erlangung des akademischen Grades Dr. Phil. im Fach Bibliotheks- und Informationswissenschaft eingereicht an der Philosophischen Fakultät I Humboldt-Universität zu Berlin von Dipl. Inform. Dennis Jarosch Präsident der Humboldt-Universität zu Berlin: Prof. Dr. Jan-Hendrik Olbertz Dekan der Philosophischen Fakultät I: Prof. Michael Seadle, Ph.D. Gutachter: 1. Prof. Dr. Robert Funk 2. Prof. Michael Seadle, Ph.D. eingereicht am: 28.10.2011 Tag der mündlichen Prüfung: 16.12.2011 Abstract The World Wide Web is amidst a transition from interactive websites to web applications. An increasing number of users perform their daily computing tasks entirely within the web browser — turning the Web into an important platform for application development. The Web as a platform, however, lacks the computational performance of native applications. This problem has motivated the inception of Microsoft Xax and Google Native Client (NaCl), two independent projects that fa- cilitate the development of native web applications. Native web applications allow the extension of conventional web applications with compiled native code, while maintaining operating system portability. This dissertation determines the bene- fits and drawbacks of native web applications. It also addresses the question how the performance of JavaScript web applications compares to that of native appli- cations and native web applications. Four application benchmarks are introduced that focus on different performance aspects: number crunching (serial and parallel), 3D graphics performance, and data processing. A performance analysis is under- taken in order to determine and compare the performance characteristics of native C applications, JavaScript web applications, and NaCl native web applications.
    [Show full text]
  • DHTML Effects in HTML Generated from DITA
    DHTML Effects in HTML Generated from DITA XML to PDF by RenderX XEP XSL-FO Formatter, visit us at http://www.renderx.com/ 2 | OpenTopic | TOC Contents DHTML Effects in HTML Generated from DITA............................................................3 XML to PDF by RenderX XEP XSL-FO Formatter, visit us at http://www.renderx.com/ OpenTopic | DHTML Effects in HTML Generated from DITA | 3 DHTML Effects in HTML Generated from DITA This topic describes an approach to creating expanding text and other DHTML effects in HTML-based output generated from DITA content. It is common for Help systems to use layering techniques to limit the amount of information presented to the reader. The reader chooses to view the information by clicking on a link. Most layering techniques, including expanding text, dropdown text and popup text, are implemented using Dynamic HTML. Overview The DITA Open Toolkit HTML transformations do not provide for layering effects. However, some changes to the XSL-T files, and the use of outputclassmetadata in the DITA topic content, along with some judicious use of JavaScript and CSS, can deliver these layering effects. Authoring Example In the following example illustrating the technique, a note element is to output as dropdown text, where the note label is used to toggle the display of the note text. The note element is simply marked up with an outputclass distinct attribute value (in this case, hw_expansion). < note outputclass="hw_expansion" type="note">Text of the note</note> Without any modification, the DITA OT will transform the note element to a paragraph element with a CSS class of the outputclass value.
    [Show full text]
  • Introduction to Scalable Vector Graphics
    Introduction to Scalable Vector Graphics Presented by developerWorks, your source for great tutorials ibm.com/developerWorks Table of Contents If you're viewing this document online, you can click any of the topics below to link directly to that section. 1. Introduction.............................................................. 2 2. What is SVG?........................................................... 4 3. Basic shapes............................................................ 10 4. Definitions and groups................................................. 16 5. Painting .................................................................. 21 6. Coordinates and transformations.................................... 32 7. Paths ..................................................................... 38 8. Text ....................................................................... 46 9. Animation and interactivity............................................ 51 10. Summary............................................................... 55 Introduction to Scalable Vector Graphics Page 1 of 56 ibm.com/developerWorks Presented by developerWorks, your source for great tutorials Section 1. Introduction Should I take this tutorial? This tutorial assists developers who want to understand the concepts behind Scalable Vector Graphics (SVG) in order to build them, either as static documents, or as dynamically generated content. XML experience is not required, but a familiarity with at least one tagging language (such as HTML) will be useful. For basic XML
    [Show full text]
  • COMP 2145 Web Programming
    South Central College COMP 2145 Web Programming Common Course Outline Course Information Description This course covers the popular server-side language PHP and Drupal, a popular CMS (Content Management System). It includes important language concepts such as data types, control statements, debugging techniques, the use of SQL (Standard Query Language). PHP will give the student experience with LAMP (Linux, Apache, MySQL, and PHP) . Prerequisites: COMP1140 - Web Development with a C or higher, or a working knowledge of HTML, CSS, and FTP. COMP1130 - Programming Fundamentals with a C or higher, or a working knowledge of at least one programming language. It is strongly recommended that you have a minimum typing speed of at least 35 wpm as well as a working knowledge of Microsoft Access (COMP1125). Instructional Associate Degree Level Total Credits 4.00 Total Hours 64.00 Types of Instruction Instruction Type Credits/Hours Online/lecture Pre/Corequisites C or better in COMP1140 C or better in COMP1130 or equivalent programming experience Course Competencies 1 Install and use PHP on a local server. Learning Objectives Describe Open Source software and why it is effective for improved software development. Draw a picture describing the relationship between client/server objects used by PHP and mySQL. Common Course Outline September, 2016 Install PHP and mySQL and an Apache web server. Write a simple test program using PHP on the local server (http://localhost/ ) Establish a working environment for PHP web page development. Use variables, constants, and environment variables in a PHP program. 2 Utilize HTML forms and PHP to get information from the user.
    [Show full text]
  • AJAX and Jquery L Raw AJAX Handling in JS Is Very Tedious L Jquery Provides Flexible and Strong Support to Handle AJAX Interactions Through a Set of Jquery Functions
    AJAX Asynchronous Design in Web Apps IT 4403 Advanced Web and Mobile Applications Jack G. Zheng Fall 2019 Topics l AJAX concepts and technical elements l AJAX implications and impacts l jQuery AJAX l Basic and shorthand methods l Error handling 2 AJAX l AJAX (Asynchronous JavaScript and XML) is a group of interrelated web development techniques used on the client-side to create interactive web applications. l Despite the name, the use of XML is not actually required, nor do the requests need to be asynchronous. 3 First Impression l https://www.google.com Use Chrome’s developer tools to view network communications while typing the search terms. A set of requests have been made to get JSON data from the server as I type in the search term box. Observe the “q” parameter in all URLs. 4 AJAX Model Difference With Ajax, web applications can communicate with servers in the background without a complete page loading after every request/response cycle. http://www.adaptivepath.com /ideas/ajax-new-approach- web-applications/ 5 Traditional Model The client does not generate views/presentations (HTML/CSS). Synchronous communications feature sequential request/response cycles, one after another The server prepares the whole page. http://www.websiteoptimization.com/secrets/ajax/8-1-ajax-pattern.html 6 Ajax Model l With Ajax, web applications can communicate with servers in the background without a complete page loading after every request/response cycle. The client generates views/presentations and update content (partial page) by manipulating DOM. Asynchronous communications feature independent request/response cycles The server prepares partial pages (partial HTML) or just data (XML or JSON).
    [Show full text]
  • EMERGING TECHNOLOGIES Dymamic Web Page Creation
    Language Learning & Technology January 1998, Volume 1, Number 2 http://llt.msu.edu/vol1num2/emerging/ pp. 9-15 (page numbers in PDF differ and should not be used for reference) EMERGING TECHNOLOGIES Dymamic Web Page Creation Robert Godwin-Jones Virginia Comonwealth University Contents: • Plug-ins and Applets • JavaScript • Dynamic HTML and Style Sheets • Instructional Uses • Resource List While remaining a powerful repository of information, the Web is being transformed into a medium for creating truly interactive learning environments, leading toward a convergence of Internet connectivity with the functionality of traditional multimedia authoring tools like HyperCard, Toolbook, and Authorware. Certainly it is not fully interactive yet, but that is undeniably the trend as manifested in the latest (version 4) Web browsers. "Dynamic HTML," incorporated into the new browsers, joins plug-ins, Web forms, Java applets, and JavaScript as options for Web interactivity. Plug-ins and Applets While Web pages are beginning to behave more like interactive applications, traditional authoring tools are themselves becoming Internet-savvy, primarily through the use of "plug-in" versions of players which integrate with Web browsers. The most commonly used plug-in today is Macromedia's "Shockwave," used to Web-enable such applications as Director, Authorware, and Flash. "Shocked" Web pages can be very interactive and provide a visually appealing means of interacting with users (as in some sample ESL exercises from Jim Duber). Plug-ins are easy to use -- they just need to be downloaded and installed. Some come bundled with Netscape and Microsoft's browsers, which simplifies considerably the installation process (and gives developers the confidence that most users will actually have the plug-in installed).
    [Show full text]
  • Webgl: up and Running
    WebGL: Up and Running Tony Parisi O'REILLY' Beijing • Cambridge • Farnham • Köln • Sebastopol • Tokyo Table of Contents Foreword vii Preface ix 1. An Introduction to WebGL 1 WebGL—A Technical Definition 2 3D Graphics—A Primer 4 3D Coordinate Systems 4 Meshes, Polygons, and Vertices 4 Materials, Textures, and Lights 5 Transforms and Matrices 6 Cameras, Perspective, Viewports, and Projections 7 Shaders 7 The WebGL API 9 The Anatomy of a WebGL Application 10 The Canvas and Drawing Context 10 The Viewport 11 Buffers, ArrayBuffer, and Typed Arrays 11 Matrices 12 TheShader 13 Drawing Primitives 14 Chapter Summary 15 2. Your First WebGL Program 17 Three.js—A JavaScript 3D Engine 17 Setting Up Three.j s 19 A Simple Three.js Page 20 A Real Example 22 Shading the Scene 26 Adding a Texture Map 27 Rotating the Object 28 iii The Run Loop and requestAnimationFrame() 28 Bringing the Page to Life 29 Chapter Summary 30 3. Graphics 31 Sim.js—A Simple Simulation Framework for WebGL 32 Creating Meshes 33 Using Materials, Textures, and Lights 38 Types of Lights 38 Creating Serious Realism with Multiple Textures 41 Textures and Transparency 46 Building a Transform Hierarchy 46 Creating Custom Geometry 50 Rendering Points and Lines 54 Point Rendering with Particle Systems 54 Line Rendering 56 Writing a Shader 57 WebGL Shader Basics 57 Shaders in Three.js 59 Chapter Summary 64 4. Animation 67 Animation Basics 67 Frame-Based Animation 67 Time-Based Animation 68 Interpolation and Tweening 69 Keyframes 70 Articulated Animation 70 Skinned Animation 71 Morphs 71 Creating Tweens Using the Tween.js Library 72 Creating a Basic Tween 73 Tweens with Easing 76 Animating an Articulated Model with Keyframes 79 Loading the Model 79 Animating the Model 81 Animating Materials and Lights 84 Animating Textures 86 Animating Skinned Meshes and Morphs 89 Chapter Summary 89 5.
    [Show full text]
  • Chapter 10 Document Object Model and Dynamic HTML
    Chapter 10 Document Object Model and Dynamic HTML The term Dynamic HTML, often abbreviated as DHTML, refers to the technique of making Web pages dynamic by client-side scripting to manipulate the document content and presen- tation. Web pages can be made more lively, dynamic, or interactive by DHTML techniques. With DHTML you can prescribe actions triggered by browser events to make the page more lively and responsive. Such actions may alter the content and appearance of any parts of the page. The changes are fast and e±cient because they are made by the browser without having to network with any servers. Typically the client-side scripting is written in Javascript which is being standardized. Chapter 9 already introduced Javascript and basic techniques for making Web pages dynamic. Contrary to what the name may suggest, DHTML is not a markup language or a software tool. It is a technique to make dynamic Web pages via client-side programming. In the past, DHTML relies on browser/vendor speci¯c features to work. Making such pages work for all browsers requires much e®ort, testing, and unnecessarily long programs. Standardization e®orts at W3C and elsewhere are making it possible to write standard- based DHTML that work for all compliant browsers. Standard-based DHTML involves three aspects: 447 448 CHAPTER 10. DOCUMENT OBJECT MODEL AND DYNAMIC HTML Figure 10.1: DOM Compliant Browser Browser Javascript DOM API XHTML Document 1. Javascript|for cross-browser scripting (Chapter 9) 2. Cascading Style Sheets (CSS)|for style and presentation control (Chapter 6) 3. Document Object Model (DOM)|for a uniform programming interface to access and manipulate the Web page as a document When these three aspects are combined, you get the ability to program changes in Web pages in reaction to user or browser generated events, and therefore to make HTML pages more dynamic.
    [Show full text]
  • How We Build Web Applications
    Whitepaper How We Build Web Applications Whitepaper 1 BuildableWorks.com Table of Contents About Buildable ............................................................................................ 3 Web Application Architecture ................................................................. 4 Our Process .................................................................................................. 6 Application Architecture Guidelines ............................................... 8 Management ......................................................................................... 8 Anatomy of a Web App .............................................................................. 10 User Experience Design ...................................................................... 10 Application Build and Deployment .................................................... 14 Frontend Tools ...................................................................................... 15 Backend Tools ........................................................................................ 20 Authentication and Security ............................................................. 22 Whitepaper 2 BuildableWorks.com About Buildable Our nimble, versatile team of full-stack engineers, creatives, and developers come to work every day with the knowledge we’re making the stuff that will change our clients’ work lives for the better. It’s why we attract and keep some of the best technical talent in the industry, and it’s how we deliver the highest quality
    [Show full text]
  • Introduction to HTML/CSS/SVG/D3
    D3 Tutorial Introduction of Basic Components: HTML, CSS, SVG, and JavaScript D3.js Setup Edit by Jiayi Xu and Han-Wei SHen, THe OHio State University HTML - Hyper Text Markup Language • HTML is the standard markup language for creating Web pages • HTML describes the structure of Web pages using markup • HTML elements • HTML elements are the building blocks of HTML pages • represented by tags • Tags • HTML tags label pieces of content such as • <head> tag for “heading” • <p> for “paragraph” • <table> for “table” and so on • Browsers do not display the HTML tags, but use them to render the content of the page HTML - Plain Text • If we display the information only by plain text HTML Basics HTML is designed for marking up text by adding tags such as <p> to create HTML elements. Example image: HTML - Codes and the Result HTML - DOM • When a web page is loaded, the browser creates a Document Object Model of the page • The HTML DOM model is constructed as a tree of Objects HTML - DOM Document Root element: <html> Element: Element: <head> <body> Element: Element: Element: Element: <p> Element: <p> <title> <h1> <img> "to create Text: "HTML Text: "HTML Element "is designed Element: "by adding Element Element: Attribute: Attribute: HTML Tutorial" Basics" <strong> for" <em> tags such as" <code> <strong> "src" "style" elements. " "marking up “Example "HTML" "<p>" text" image” HTML - DOM • With the object model, JavaScript can create dynamic HTML by manipulating the objects: • JavaScript can change all the HTML elements in the page • Change all the
    [Show full text]
  • Dynamic HTML Friday, October 29, 2010 8:04:48 AM
    Introduction to Dynamic HTML Friday, October 29, 2010 8:04:48 AM ©2010 Microsoft Corporation. All rights reserved. Introduction to Dynamic HTML 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. For 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 [ http://msdn.microsoft.com/en-us/library/ms535249(VS.85).aspx ] 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 roundtrips to and from a server before seeing the results.
    [Show full text]