DHTML. What is DHTML?  DHTML is the combination of several built-in browser features in fourth generation browsers that enable a web page to be more.

Slides:



Advertisements
Similar presentations
JavaScript FaaDoOEngineers.com FaaDoOEngineers.com.
Advertisements

IIS Technologies.
Project 1 Introduction to HTML.
Introduction to Web Application Architectures Web Application Architectures 18 th March 2005 Bogdan L. Vrusias
CS 898N – Advanced World Wide Web Technologies Lecture 15: Dynamic HTML Chin-Chih Chang
Outline IS400: Development of Business Applications on the Internet Fall 2004 Instructor: Dr. Boris Jukic DHTML.
1st Project Introduction to HTML.
4.01B Authoring Languages and Web Authoring Software 4.01 Examine webpage development and design.
HTML 1 Introduction to HTML. 2 Objectives Describe the Internet and its associated key terms Describe the World Wide Web and its associated key terms.
Chapter ONE Introduction to HTML.
By: Shawn Li. OUTLINE XML Definition HTML vs. XML Advantage of XML Facts Utilization SAX Definition DOM Definition History Comparison between SAX and.
DHTML - Introduction Introduction to DHTML, the DOM, JS review.
Chapter 1 Introduction to HTML, XHTML, and CSS
INTRODUCTION TO DHTML. TOPICS TO BE DISCUSSED……….  Introduction Introduction  UsesUses  ComponentsComponents  Difference between HTML and DHTMLDifference.
_______________________________________________________________________________________________________________ E-Commerce: Fundamentals and Applications1.
JavaScript and The Document Object Model MMIS 656 Web Design Technologies Acknowledgements: 1.Notes from David Shrader, NSU GSCIS 2.Some material adapted.
HTML Forms and Scripts. Session overview What are forms? Static vs dynamic Client-side scripts –JavaScript.
 2004 Prentice Hall, Inc. All rights reserved. Chapter 13 - Dynamic HTML: Object Model and Collections Outline 13.1 Introduction 13.2 Object Referencing.
HTML DOM.  The HTML DOM defines a standard way for accessing and manipulating HTML documents.  The DOM presents an HTML document as a tree- structure.
Advanced Web Design Scripting Tutorial Chapters. Scripting Intro The scripting part of the forthcoming Advanced Web Design textbook introduces you to.
SEG3210 DHTML Tutorial. DHTML DHTML is a combination of technologies used to create dynamic and interactive Web sites. –HTML - For creating text and image.
Tutorial 6 By Sam INE 1020 Introduction to Internet Engineering 1 DHTML & CSS Tutorial 6.
Lesson 19. JavaScript errors Since JavaScript is an interpreted language, syntax errors will usually cause the script to fail. Both browsers will provide.
1 JavaScript: Objects and Object Models October 25, 2005 Slides modified from Internet & World Wide Web: How to Program (3rd) edition. By Deitel,
SEG3210 DHTML Tutorial. DHTML DHTML is a combination of technologies used to create dynamic and interactive Web sites. –HTML - For creating text and image.
Working with Objects Creating a Dynamic Web Page.
CITS1231 Web Technologies JavaScript and Document Object Model.
HTML, XHTML, and CSS Sixth Edition Chapter 1 Introduction to HTML, XHTML, and CSS.
The Document Object Model. The Web B.D, A.D. They aren’t web pages, they’re document objects A web browser interprets structured information. A server.
 2004 Prentice Hall, Inc. All rights reserved. 1 Chapter 34 - Case Study: Active Server Pages and XML Outline 34.1 Introduction 34.2 Setup and Message.
JavaScript, Fourth Edition
INTRODUCTION TO JAVASCRIPT AND DOM Internet Engineering Spring 2012.
Extending HTML CPSC 120 Principles of Computer Science April 9, 2012.
Javascript II DOM & JSON. In an effort to create increasingly interactive experiences on the web, programmers wanted access to the functionality of browsers.
DHTML - Introduction Chapter Introduction to DHTML, the DOM, JS review.
Interactive Client-Side Technologies MMIS 656 Web Design Technologies Acknowledgements: Estrella, S. (2003). The Web Wizard’s Guide to DHTML and CSS.
 2001 Deitel & Associates, Inc. All rights reserved. 1 Chapter 20 – Dynamic HTML: Object Model and Collections Outline 20.1Introduction 20.2Object Referencing.
DHTML: Working with Objects Creating a Dynamic Web Page.
Introduction to Programming the WWW I CMSC Summer 2003 Lecture 7.
Building Rich Web Applications with Ajax Linda Dailey Paulson IEEE – Computer, October 05 (Vol.38, No.10) Presented by Jingming Zhang.
 2004 Prentice Hall, Inc. All rights reserved. Chapter 13 - Dynamic HTML: Object Model and Collections Outline 13.1 Introduction 13.2 Object Referencing.
Session: 1. © Aptech Ltd. 2Introduction to the Web / Session 1  Explain the evolution of HTML  Explain the page structure used by HTML  List the drawbacks.
Cs332a_chapt10.ppt CS332A Advanced HTML Programming DHTML Dynamic Hypertext Markup Language A term describing a series of technologies Not a stand-a-lone.
Internet & World Wide Web How to Program, 5/e. © by Pearson Education, Inc. All Rights Reserved.2 Revised by Dr. T. Tran for CSI3140.
DYNAMIC HTML What is Dynamic HTML: HTML code that allow you to change/ specify the style of your web pages. Example: specify style sheet, object model.
CSS1 Dynamic HTML Objects, Collections & Events. CSS2 Introduction Dynamic HTML treats HTML elements as objects. Element’s parameters can be treated as.
TOPIC II Dynamic HTML Prepared by: Nimcan Cabd Cali.
CO1552 – Web Application Development Further JavaScript: Part 1: The Document Object Model Part 2: Functions and Events.
Introduction to HTML. _______________________________________________________________________________________________________________ 2 Outline Key issues.
4.01B Authoring Languages and Web Authoring Software 4.01 Examine webpage development and design.
HTML Concepts and Techniques Fifth Edition Chapter 1 Introduction to HTML.
CSS Hadas Kahsay. Overview  What is CSS  Basic syntax of CSS Rules  How to link CSS style to html documents  Browsers and CSS  Advantages of CSS.
Host Objects: Browsers and the DOM
Chapter 1 Introduction to HTML, XHTML, and CSS HTML5 & CSS 7 th Edition.
Introduction to the World Wide Web & Internet CIS 101.
 2000 Deitel & Associates, Inc. All rights reserved. Chapter 15 – Dynamic HTML: Object Model and Collections Outline 15.1Introduction 15.2Object Referencing.
Chapter 10 Dynamic HTML (DHTML) JavaScript, Third Edition.
XML DOM Week 11 Web site:
Jackson, Web Technologies: A Computer Science Perspective, © 2007 Prentice-Hall, Inc. All rights reserved Chapter 5 Host Objects: Browsers.
HTML PROJECT #1 Project 1 Introduction to HTML. HTML Project 1: Introduction to HTML 2 Project Objectives 1.Describe the Internet and its associated key.
DHTML.
Project 1 Introduction to HTML.
Chapter 1 Introduction to HTML.
Project 1 Introduction to HTML.
JavaScript Introduction
DHTML Javascript Internet Technology.
Chapter 13 - Dynamic HTML: Object Model and Collections
DHTML Javascript Internet Technology.
Introduction to Programming the WWW I
Introduction to DHTML, the DOM, JS review
Presentation transcript:

DHTML

What is DHTML?  DHTML is the combination of several built-in browser features in fourth generation browsers that enable a web page to be more dynamic.  DHTML is NOT a scripting language (like JavaScript or VBscript), but a browser feature- or enhancement- that makes the browser dynamic  It uses a host of different technologies - JavaScript, VBScript, the Document Object Model (DOM), layers, cascading stylesheets - to create HTML that can change even after a page has been loaded into a browser

What is DHTML?  It is considered to be made up of –HTML –Cascading Style Sheets (CSS) –Scripting language  All three of these components are linked via Document Object Model (DOM)  DOM is the interface that allows scripting languages to access the content, style, and structure of the web documents and change them dynamically

Tools of DTHML  HTML and XML –Partitions and Organizes the content  CSS –Defines the Presentation of the content  Scripting - JavaScript, JScript, VBScript –Adds interactivity to the page  DOM- Document Object Model –Defines what and how elements are exposed for script access

Components of DHTML DHTML requires four independent components to work: HTML, Cascading Style Sheets, Scripting and the Document Object Model. The section provides a brief description of each component. 1.HTML: HTML defines the structure of a Web page, using such basic elements as headings, forms, tables, paragraphs and links. On December 18, 1997, HTML 4.0 attained "recommended" status at the W3C. Changes and enhancements introduced in HTML 4.0 made DHTML possible. 2. Cascading Style Sheets (CSS): Similar to a template in a word- processing document, a style sheet controls the formatting of HTML elements. Like in traditional desktop publishing, one can use style sheet to specify page margins, point sizes and leading. Cascading Style Sheets is a method to determine precedence and to resolve conflicts when multiple styles are used.

3. Scripting: Scripting provides the mechanisms to interpret user actions and produce client-side changes to a page. For example, scripts can interpret mouse actions (such as the mouse passing over a specified area of a page through the event model) and respond to the action by using a set of predefined instructions (such as highlighting the text activated by the mouse action). Although DHTML can communicate with several scripting languages, JavaScript is the de facto standard for creating cross-browser DHTML pages. 4. Document Object Model (DOM): The DOM outlines Web page content in a way that makes it possible for HTML elements, style sheets and scripting languages to interact with each other. The W3C defines the DOM as "a platform- and language- neutral interface that will allow programs and scripts to dynamically access and update the content, structure, and style of documents. The document can be further processed and the results of that processing can be incorporated back into the presented stage."

DOM – Document Object Model

DOM Introduction Dynamic HTML object model –“The Document Object Model (DOM) is an application programming interface (API) for HTML and XML documents. It defines the logical structure of documents and the way a document is accessed and manipulated.” –Great control over presentation of pages Access to all elements on the page –Whole web page (elements, forms, frames, tables, etc.) represented in an object hierarchy – “Anything found in an HTML or XML document can be accessed, changed, deleted, or added using the Document Object Model, with a few exceptions.”

DOM Introduction – cont’d HTML elements treated as objects –Attributes of these elements treated as properties of those objects Objects identified with an ID attribute can be scripted with languages like JavaScript and VBScript. Elements on the page can be supported by scripting that can interact with user events and change the page content dynamically. The DOM dictates how the written scripting language controls the elements on the screen, such as graphics and text.

DOM-Document Object Model …  The Document Object Model is a platform- and language-neutral interface that will allow programs and scripts to dynamically access and update the content, structure and style of the document  The DOM details the characteristic properties of each element of a Web page, thereby detailing how we might manipulate these components and, in turn, manipulate the page

 Document Object Model is not a "part" of Scripting languages. The DOM stands alone, able to be interfaced with any programming language designed to do so  The W3C DOM is the recommended standard to be exposed by each browser  Microsoft Internet Explorer and Netscape do not share the same DOM. DOM-Document Object Model…

 Both (IE and Netscape) DOMs break down Web pages into roughly four types of components –Objects, Properties, Events and Methods  Objects : –Container which reflects a particular element of a page –objects "contain" the properties and methods which apply to that element DOM-Document Object Model…

 Properties: –Characteristics of an object –Example: the ‘document’ object possesses a ‘bgColor’ property which reflects the background color of the page. –Using a programming language (e.g. JavaScript) you may, via this property, read or modify the background color of a page DOM-Document Object Model…

 Methods: –A method typically executes an action which acts upon the object by which it is owned  Events: –Used to trap actions related to its owning object –Typically, these actions are caused by the user DOM-Document Object Model…

DOM DOM = Document Object Model Defines a hierarchical model of the document structure through which all document elements may be accessed Nodes The W3C DOM defines element of a document is a node of a particular type Node Types Common types are: document node, element node, text node, attribute node, comment node, document-type node

DOM Example document node Document_type node element node element node element node text node "Sample" element node element node text node "This is a..."

Netscape DOM  DOM "begins" at the window object;  Other objects are below the window object in the hierarchy  Exception is the navigator object, (whose properties provide information about the browser version,) which is a peer object of window rather than a child

Microsoft DOM  Microsoft indexes an additional topic called as collections. A "collection," is an array-based object  The observable difference between the two is the syntax. Netscape supports a treelike hierarchical syntax  On the other hand, Internet Explorer exposes all HTML objects as a flat collection and lets you modify the style object

window document history navigator applets all anchors body embeds forms filters images links plugins styleSheets scripts location screen event document plugins object collection Key frames

15.3 Collections all and children Collections are basically arrays of related objects on a page all –Collection of all the HTML elements in a document in the order in which they appear length property –Specifies the number of elements in the collection tagName property of an element –Determines the name of the element Every element has its own all collection, consisting of all the elements contained within that element

Advantage –Robust API for DOM tree –Relatively simple to modify data structure and extract data Disadvantage Store entire document in memory As DOM was written for any language method naming not follow the standard VB programming conventions

Conclusion - Overview  DHTML – HTML, CSS, Scripting and DOM  DOM - details the characteristic properties of each element of a Web page

 DHTML can make your browser dynamic and interactive  Content and design can be separated using Style sheets & uniformity of the site can be maintained using them  Validation of input’s given by the user can be done at the client side, without connection to the server  Drop down menus can be used to put a lot of information on the site Conclusion – Overview…