Dynamic HTML (DHTML) Overview Cascading Style Sheets Document Object Model Event Model Filters and Transitions Data Binding Cross-Browser Compatibility.

Slides:



Advertisements
Similar presentations
Cascading Style Sheets (CSS). Cascading Style Sheets With the explosive growth of the World Wide Web, designers and programmers quickly explored and reached.
Advertisements

Pemrograman Teknologi Internet W09: DOM & DHTML. 2 Objectives DOM: DOM: DOM Nodes & Trees DOM Nodes & Trees Traversing & Modifying DOM Trees Traversing.
Working with Special Effects Creating Rollovers, Menus, Filters, and Transitions.
1 Web Developer & Design Foundations with XHTML Chapter 9 Key Concepts.
Session 11 Dynamic HTML: Event Model and Filters Matakuliah: M0114/Web Based Programming Tahun: 2005 Versi: 5.
Chapter 6 Web Typography
Chapter 16 Dynamic HTML and Animation The Web Warrior Guide to Web Design Technologies.
CS 898N – Advanced World Wide Web Technologies Lecture 15: Dynamic HTML Chin-Chih Chang
1 Dynamic HTML and Cascading Style Sheets (CSS) Dynamic HTML and Cascading Style Sheets (CSS) Electronic Commerce Prof. Sheizaf Rafaeli.
4.01 Cascading Style Sheets
Chapter 7: Dynamic HTML and Animation JavaScript - Introductory.
UNIT 6 JAVASCRIPT EVENT HANDLERS &WEB BROWSERS DETECTION.
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.
INTRODUCTION TO DHTML. TOPICS TO BE DISCUSSED……….  Introduction Introduction  UsesUses  ComponentsComponents  Difference between HTML and DHTMLDifference.
1 Web Developer Foundations: Using XHTML Chapter 9 Cascading Style Sheet Concepts.
Chapter 11 Cascading Style Sheets: Part I The Web Warrior Guide to Web Design Technologies.
_______________________________________________________________________________________________________________ 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.
Dreamweaver -- CSS. Dreamweaver -- MX New icons are added in MX Most of the features commonly used in web design, and are same as FrontPage. New feature.
JavaScript - a Brief Introduction Anupriya. What is JavaScript Object based (not object oriented) programming language –very limited object creation –a.
 2004 Prentice Hall, Inc. All rights reserved. Chapter 13 - Dynamic HTML: Object Model and Collections Outline 13.1 Introduction 13.2 Object Referencing.
Chapter 6 Web Typography. 2 Principles of Web Design Chapter 5 Objectives Understand principles for type design on a Web site Use the element Understand.
Today’s objectives  Presentational | Inline | Block | Validate  CSS | Rules | Declarations.
Tutorial 6 By Sam INE 1020 Introduction to Internet Engineering 1 DHTML & CSS Tutorial 6.
CNIT 133 Interactive Web Pags – JavaScript and AJAX JavaScript Environment.
Lesson 19. JavaScript errors Since JavaScript is an interpreted language, syntax errors will usually cause the script to fail. Both browsers will provide.
DHTML: Dynamic HTML Internet Technology1. What is DHTML? A collection of enhancements to HTML ► To create dynamic and interactive websites Combination.
 This presentation introduces the following: › 3 types of CSS › CSS syntax › CSS comments › CSS and color › The box model.
Creating an Animated Web Page
Working with Objects Creating a Dynamic Web Page.
CITS1231 Web Technologies JavaScript and Document Object Model.
XP Tutorial 4 New Perspectives on JavaScript, Comprehensive1 Working with Objects Creating an Animated Web Page.
Cascading Style Sheets CSS by Pavlovic Nenad by. 2Cascading Style Sheets Presentation Contents What are CSS? What are CSS? History of CSS History of CSS.
Flash & JavaScript Mariela Hristova October 19, 2004 INF 385E – Fall 2004 – School of Information.
Lesson13. JavaScript JavaScript is an interpreted language, designed to function within a web browser. It can also be used on the server.
Javascript II DOM & JSON. In an effort to create increasingly interactive experiences on the web, programmers wanted access to the functionality of browsers.
 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 13 - Dynamic HTML: Object Model and Collections Outline 13.1 Introduction 13.2 Object Referencing.
 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.
DHTML1-1 Dynamic HTML: Filters & Data Binding with Table Xingquan (Hill) Zhu
Introduction to Programming the WWW I CMSC Summer 2003 Lecture 7.
Chapter 7: DHTML: Object Model and Collections CIS 275—Web Application Development for Business I.
 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.
Web Development 101 Presented by John Valance
Cs332a_chapt10.ppt CS332A Advanced HTML Programming DHTML Dynamic Hypertext Markup Language A term describing a series of technologies Not a stand-a-lone.
DHTML. What is it? Dynamic HTML. Not a standard unlike HTML or Java It is a term applied by both Netscape and Microsoft to a collection of technologies.
Cascading Style Sheets Eugenia Fernandez IUPUI. CSS Purpose CSS allow you to specify the style in which your XML elements are displayed. CSS were originally.
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.
Introduction to HTML. _______________________________________________________________________________________________________________ 2 Outline Key issues.
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.
 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.
Blended HTML and CSS Fundamentals 3 rd EDITION Tutorial 3 Introducing Cascading Style Sheets.
The Web Wizard’s Guide To DHTML and CSS Chapter 2 A Review of CSS2 and JavaScript.
Chapter 13: DHTML: Object Model and Collections CIS 275—Web Application Development for Business I.
CSS Introductions. Objectives To take control of the appearance of a Web site by creating style sheets. To use a style sheet to give all the pages of.
Working with Cascading Style Sheets
DHTML.
Objective % Select and utilize tools to design and develop websites.
Creating Dynamic Web Pages with FrontPage Barry Sosinsky Valda Hilley
Project 1 Introduction to HTML.
Dynamic HTML.
Objective % Select and utilize tools to design and develop websites.
DHTML Javascript Internet Technology.
Chapter 13 - Dynamic HTML: Object Model and Collections
DHTML Javascript Internet Technology.
Presentation transcript:

Dynamic HTML (DHTML) Overview Cascading Style Sheets Document Object Model Event Model Filters and Transitions Data Binding Cross-Browser Compatibility Links

What is DHTML Generally, DHTML refers to applications that allow a Web page to change dynamically without requiring information to be passed to/from a web server. More specifically, DHTML refers to the interaction of HTML, CSS and Scripting language (JavaScript). Crucial component of DHTML is DOM (Document Object Model) DHTML = HTML + CSS + JavaScript + DOM

Why comes DHTML To make Web pages interactive. HTML pages have static nature. DHTML provides us with enhanced creative control so we can manipulate any page element at any time. It is the easiest way to make Web pages interactive. It doesn’t increase server workload and require special software to support.

Cascading Style Sheets (CSS) The purpose of CSS is to define styles for a document's content. To specify font sizes and faces, margin heights and widths, borders and padding, even text decoration. To create absolutely and relatively positioned content.

CSS CSS brings powerful layout and design capabilities to DHTML. CSS provides an efficient way to define universal style. Separation the structure of document from content allows greater manageability and makes changing the style easier.

CSS evolution CSS1 (W3C Recommendation in Dec. 1996) It describes the CSS language as well as a simple visual formatting model. CSS2 (May. 1998) It builds on CSS1 and adds support for media-specific style sheets (e.g. printers and aural devices), downloadable fonts, element positioning and tables. CSS3 (under development) Concentrate on modularization.

Adding Style to A Document Use an outside style sheet, either by importing it or by linking it. Embed a document-wide style in the element of the document. Provide an inline style exactly where the style needs to be applied.

Examples Definition Rule H1 { font-size: 24pt; color: green }.dark { font-weight: bold } Create Style and Grouping Styles (css1.html) Linking external style sheets (imported.html)

Other Methods to Define Styles Using Document Object Model to Define Styles Example: document.tags.H1.color = "red"; Using JavaScript to Define Styles (NS 4.0+) tags.P.fontSize = "18pt"; with (tags.P) { fontSize = "18pt"; tags.P.color ="green"; color ="green"; tags.P.marginLeft = "20pt"; marginLeft = "20pt"; } tags.H1.color = "blue";

Document Object Mode (DOM) DOM is a platform- and language-neutral interface that allow programs and scripts to dynamically access and manipulate the content, structure and style of documents. DOM chooses OMG IDL to provide language- independent specification of the DOM interfaces and provides language bindings for Java and ECMAScript.

DOM evolution Level 0 (Netscape Navigator 3.0 and MS IE 3.0) Level 1 (Oct. 1998) Contains functionality for document navigation and manipulation of the content and structure of HTML and XML documents.

Level 2 (Nov. 2000) It is made of a set of core interfaces to create and manipulate the structure and contents of a document and a set of optional modules. These modules contain specialized interfaces dedicated to XML, HTML, an abstract view, generic style sheets, CSS, Events, traversing the document structure, and a Range object. It builds on the Level 1. Level 3 (Draft, under development) Expands Level 2 to define some DOMUtility interfaces.

Objects and Collections supported by IE 5.0 Some Objects window document body history location navigator event screen Some Collections all anchors applets forms frames images links …

Examples Combination of Dynamic Positioning, Content and Styles (dynamicposition.html) Using the frames Collection (index.html, top.html)

Event Model DHTML provides full support for keyboard and mouse events on all page elements. Some popular events ONLOAD ONCLICK ONMOUSEMOVE ONMOUSEOVER ONMOUSEOUT ONFOCUS and ONBLUR ONERROR (for error handling) … Example (onmouseoverout.html)

Filters and Transitions Use and combine filters to achieve special effects. Create animated visual transitions between Web pages. Modify filters dynamically using DHTML.

Examples Flip filters: flipv and fliph (flip.html) Transparency with chroma Filter (chroma.html) Add shadows to text (shadow.html) Filter blendTrans (blendtrans2.html) Filter revealTrans (revealtrans.html)

Data Binding TDC – Tabular Data Control Bind a TABLE and other HTML elements to Data Source Objects (DSOs). Sort and filter data directly on the client without involving the server. Filter data to select only records appropriate for a particular application. Navigate backwards and forwards through a database with the Move methods. Example (advancesort.html)

Cross-browser Compatibility (Cross-platform) Most popular browsers are Microsoft’s Internet Explorer (IE) and Netscape’s Navigator (NS). Many features of them are common. Both support HTML, CSS, DOM and JavaScript. Most of their features are incompatible.

Cross-browser Compatibility Features specific to IE 4.0+ VBScript, JScript ActiveX Control Data Binding Filter and Transition OpenType font Features specific to NS 4.0+ JavaScript Style Sheets BitStream font tag

Even when NS and IE expose similar objects for scripting, the syntax is not always the same. Format of references to element’s properties and methods differs between IE 4.0 and NS 4.0. Example: Position an object (obj) at a specific pixel coordinate(x,y). IE 4.0NS 4.0 obj.pixelLeft(x);obj.moveTo(x, y) obj.pixelTop(y);

Cross-browser Strategies Include the contents of the style sheet inside a comment ( ) so that browsers that do not recognize the element will ignore it. Create and redirect browser to specific pages using browser detection. Design for common denominator. Custom APIs. Create some JavaScript library for different browsers loading. Building DHTML standard is on the way!

Browser Detection function start() { if ( navigator.appName == "Microsoft Internet Explorer" ) { if ( navigator.appVersion.substring( 1, 0 ) >= "4" ) document.location = "newIEversion.html"; else document.location = "oldIEversion.html"; } else document.location = "NSversion.html"; }

Links Microsoft DHTML Document Netscape DHTML Document DOM & CSS Library (Great Site! Demo and Code available) Examples shown in the presentation

Thanks! Thanks!