© 2005 evoch, LLC Client Side Technologies: DHTML Mosh Teitelbaum evoch, LLC.

Slides:



Advertisements
Similar presentations
Table, List, Blocks, Inline Style
Advertisements

Cascading Style Sheets (CSS). Cascading Style Sheets With the explosive growth of the World Wide Web, designers and programmers quickly explored and reached.
Ideas to Layout Beginning web layout using Cascading Style Sheets (CSS). Basic ideas, practices, tools and resources for designing a tableless web site.
Today CSS HTML A project.
It’s All About Style The Basics of Style Sheets Presented by Barry Diehl.
Recognizing the Benefits of Using CSS 1. The Evolution of CSS CSS was developed to standardize display information CSS was slow to be supported by browsers.
Web Pages and Style Sheets Bert Wachsmuth. HTML versus XHTML XHTML is a stricter version of HTML: HTML + stricter rules = XHTML. XHTML Rule violations:
History Leading to XHTML
COMPSCI 345 / SOFTENG 350 TUTORIAL WEEK 8 | SAM KAVANAGH.
Outline IS400: Development of Business Applications on the Internet Fall 2004 Instructor: Dr. Boris Jukic CSS: Cascading Style Sheets.
17-Jun-15 XHTML 2 What is XHTML? XHTML stands for Extensible Hypertext Markup Language XHTML is aimed to replace HTML.
Cascading Style Sheets Controlling the Display Of Web Content.
Cascading Style Sheets Controlling the Display Of Web Content.
XHTML and CSS Overview. Hypertext Markup Language A set of markup tags and associated syntax rules Unlike a programming language, you cannot describe.
4.01 Cascading Style Sheets
Tutorial 3: Adding and Formatting Text. 2 Objectives Session 3.1 Type text into a page Copy text from a document and paste it into a page Check for spelling.
Chapter 14 Introduction to HTML
CSS (Cascading Style Sheets): How the web is styled Create Rules that specify how the content of an HTML Element should appear. CSS controls how your web.
Review HTML  What is HTML?  HTML is a language for describing web pages.  HTML stands for Hyper Text Markup Language  HTML is not a programming language,
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.
Principles of Web Design 6 th Edition Chapter 4 – Cascading Style Sheets.
Working with Cascading Style Sheets. Introducing Cascading Style Sheets Style sheets are files or forms that describe the layout and appearance of a document.
Chapter 11 Cascading Style Sheets: Part I The Web Warrior Guide to Web Design Technologies.
Chapter 4 HTML. Objectives Explain how HTML/XHTML are used and describe the difference between them Interpret HTML code Explain how HTML Forms are used.
Creating a Basic Web Page
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.
Using Styles and Style Sheets for Design
Cascading Style Sheets. Defines the presentation of one or more web pages Similar to a template Can control the appearance of an entire web site giving.
SEG3210 DHTML Tutorial. DHTML DHTML is a combination of technologies used to create dynamic and interactive Web sites. –HTML - For creating text and image.
CNIT 133 Interactive Web Pags – JavaScript and AJAX JavaScript Environment.
CS134 Web Design & Development Creating a Basic Web Page Mehmud Abliz.
SEG3210 DHTML Tutorial. DHTML DHTML is a combination of technologies used to create dynamic and interactive Web sites. –HTML - For creating text and image.
Today’s objectives  Review  CSS | Rules | Declarations  HTML Structure document  Class asignment.
 This presentation introduces the following: › 3 types of CSS › CSS syntax › CSS comments › CSS and color › The box model.
Lab 3: Language Structures User Interface Lab: GUI Lab Sep. 9 th, 2014.
Form Tag How to use Form Tag Something NEW ? PARAMETER Attribute NAME Specifies the name for a form To specify which form to submit with JavaScript, this.
WRT235: Writing in Electronic Environments Basic CSS.
Introduction to Programming the WWW I CMSC Winter 2003 Lecture 7.
CS134 Web Design & Development Cascading Style Sheets (CSS) Mehmud Abliz.
Chapter 6 Introducing Cascading Style Sheets Principles of Web Design, 4 th Edition.
ECA225 Applied Interactive Programming Cascading Style Sheets, pt 1 ECA 225 Applied Online Programming.
Advanced Web Development Instructor: Thomas Bombach.
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.
INNOV-7: Building a Richer UI for the Browser Chris Skeldon Senior Solution Consultant.
Cascading Style Sheets CSS.  Standard defined by the W3C  CSS1 (released 1996) 50 properties  CSS2 (released 1998) 150 properties (positioning)  CSS3.
Introduction to CSS. Why CSS? CSS Provides Efficiency in Design and Updates CSS relatively easy to use Can give you more flexibility and control Faster.
IS-907 Java EE World Wide Web - Overview. World Wide Web - History Tim Berners-Lee, CERN, 1990 Enable researchers to share information: Remote Access.
Web Terminology Intro to Web. North Lake College 2 by Sean Griffin HTML vs. XHTML HTML: Hypertext Markup Language XHTML: eXtensible Hypertext Markup Language.
Web Technologies Lecture 2 HTML and CSS. HTML Hyper Text Markup Language – Describes web documents – Made up of nested HTML markup tags – Tags are the.
Introduction to HTML. _______________________________________________________________________________________________________________ 2 Outline Key issues.
Unit 13 –JQuery Basics Instructor: Brent Presley.
Cascading Style Sheets Primary readings Presentations Explain & review projects with class mates.
Web Technology (NCS-504) Prepared By Mr. Abhishek Kesharwani Assistant Professor,UCER Naini,Allahabad.
Chapter 10 Dynamic HTML (DHTML) JavaScript, Third Edition.
NASRULLAHIBA.  It is time to take your web designing skills to the next level with Cascading Style Sheets (CSS). They are a way to control the look and.
© Dr. Graham Rollings Dr. Graham Rollings, 09 June 2016 HTML & CSS A very High-level Introduction.
JavaScript and Ajax (JavaScript Dynamic HTML (DHTML)) Week 7 Web site:
HTML 5 AND CSS Dr Mohd Soperi Mohd Zahid Semester /16.
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.
DHTML.
Programming Web Pages with JavaScript
4.01 Cascading Style Sheets
CSS: Cascading Style Sheets
JavaScript Event Handling.
DynamicHTML Cascading Style Sheet Internet Technology.
JavaScript & jQuery AJAX.
DynamicHTML Cascading Style Sheet Internet Technology.
4.01 Cascading Style Sheets
Presentation transcript:

© 2005 evoch, LLC Client Side Technologies: DHTML Mosh Teitelbaum evoch, LLC

© 2005 evoch, LLC DHTML DHTML = Dynamic HTML It allows you to build rich client interfaces and to modify them dynamically There is no DHTML standard It is not a W3C, IEEE, ISO or anything else standard DHTML is a collection of several standards DHTML consists of HTML/XHTML, CSS, DOM and JavaScript (or ECMAScript)

© 2005 evoch, LLC DHTML In A Nutshell DHTML is too rich to cover in an hour The technologies are way to rich to fully cover in this presentation. This presentation will: 1)Briefly introduce each technology with a quick example 2)Give a high-level overview of how to use each technology 3)Show some more advanced uses for the various technologies and review how each one works 4)Provide resources for further exploration of each technology

© 2005 evoch, LLC HTML / XHTML HTML = HyperText Markup Language Allows you to define and structure the contents of your document. Latest (last?) version is XHTML = XML HyperText Markup Language XML-Compliant definition of HTML. Current version is XHTML 1.1 which added no new HTML tags to HTML 4.01 Contents, not design HTML/XHTML was never intended to convey design

© 2005 evoch, LLC HTML / XHTML Example <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" " Sample This is a sample paragraph

© 2005 evoch, LLC CSS CSS = Cascading Style Sheets Allows you to define the styles to apply to your document. Latest version is 2.1. Design, not content CSS is intended to separate design from content Very powerful CSS is much more powerful than HTML design tags

© 2005 evoch, LLC CSS Example BODY { background-color: #CCCCCC; } P { border: 1px solid black; background-color: #FFFFFF; margin-bottom: 1em; }

© 2005 evoch, LLC 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

© 2005 evoch, LLC 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..."

© 2005 evoch, LLC JavaScript Allows you to add conditional, client-side logic and behavior to your document JavaScript != JAVA Even though they have similar names, they are very different Very powerful Current versions are incredibly powerful... fully object- oriented, conditional logic, DOM interaction, more

© 2005 evoch, LLC JavaScript Example <!-- function pushButton() { if ( confirm("Push a button") ) { alert("You pushed \"OK\""); } else { alert("You pushed \"Cancel\""); } // -->

© 2005 evoch, LLC DHTML Example Style Switcher Using JavaScript, this example dynamically "applies" the selected CSS style sheet, changing the design on the fly. - JavaScript interacts with DOM and cookies - Shows ability of CSS to affect design w/o changing HTML function setActiveStyleSheet(title) { var i, a, main; for(i=0; (a = document.getElementsByTagName("link")[i]); i++) { if(a.getAttribute("rel").indexOf("style") != -1 && a.getAttribute("title")) { a.disabled = true; if(a.getAttribute("title") == title) a.disabled = false; }

© 2005 evoch, LLC HTML tags and attributes must be lowercase All attribute values must be quoted All elements that can contain others require end tags Empty elements must either have an end tag or self-close All attributes must be name/value pairs The name attribute is deprecated. Use id instead. Some others... Differences Between HTML and XHTML

© 2005 evoch, LLC 2 Modes of Operation All modern browsers support 2 modes: Standards Mode for standard-compliant code and "Quirks" Mode for older or non-compliant code !DOCTYPE Specifies the Mode A properly formatted DOCTYPE declaration puts the browser in Standards Mode. Otherwise, it's Quirks Mode. Standards vs. Quirk Mode <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "

© 2005 evoch, LLC tag Delineates inline styles HTML and CSS /* Styles go here... */ tag References external style sheets. Allows for alternates. STYLE attribute Defines inline styles for a specific block of HTML code some text

© 2005 evoch, Directive Loads an external style sheet. Does not allow alternates. Not supported in some older browsers. Rules Defines which styles to apply to which elements Selectors Specifies the element or type of element that style affects Declarations Specifies CSS properties and values CSS: Syntax

© 2005 evoch, LLC CSS: Rule Structure P{ } color: #000000;font: arial; Rule Selector Declaration Block Declaration Property Value

© 2005 evoch, LLC CSS: Selector Types P { color: black; }/* Element Selector */ P, H1, H2 { color: black; }/* Grouping Selector */ * { color: black; }/* Universal Selector */ P.urgent,.Error { color: black; }/* Class Selector */ #Menu { color: black; }/* ID Selector */ *[title], A[href][title] { color: black; }/* Attribute Selector */ A[title="home page"] { color: black; }/* Exact Attribute Selector */ A[title~="foo"] { color: black; }/* Partial Attribute Selector */ *[lang|="en"] { color: black; }/* Particular Attribute Selector */ UL LI UL { color: black; }/* Descendant Selector */ P > STRONG { color: black; }/* Child Selector */ H1 + P { color: black; }/* Adjacent Sibling Selector */ A:hover { color: black; }/* Pseudo-Class Selector */ P:first-letter { font-size: 200%; }/* Pseudo-Element Selector */

© 2005 evoch, LLC CSS: Common Declaration Properties backgroundbackground-attachmentbackground-color background-repeatborderbottom colorcursordisplay floatfontfont-family font-sizefont-stylefont-weight heightleftletter-spacing line-heightlist-style-imagelist-style-position list-style-typemarginoverflow paddingpositionright text-aligntext-decorationtext-indent text-transformtopvertical-align visibilitywhite-spacewidth word-spacingword-wrapz-index

© 2005 evoch, LLC CSS: Box Model element Margin Border Padding

© 2005 evoch, LLC tag Delineates inline code or references external code files HTML and JavaScript // Code goes here... Event Attributes Defines event handlers for events of specific elements <IMG SRC="blue.gif" onMouseOver="this.src='red.gif';" onMouseOut="this.src='blue.gif';" >

© 2005 evoch, LLC Full, feature-rich language Supports all standard control mechanisms: conditionals, loops, variables, try/catch/throw, functions, "objects" Very powerful Earlier versions were limited. Current version is not. Syntactically similar to CFScript CFScript syntax was based on JavaScript Access to most browser features/properties Cannot normally access local file system, etc. JavaScript

© 2005 evoch, LLC Advanced DHTML Example 1 Bouncing Balls Using a combination of all DHTML technologies, this example dynamically creates and tracks the movements of an unlimited number of bouncing balls. - Creates new content dynamically - DOM manipulation to render animation and live data

© 2005 evoch, LLC Advanced DHTML Example 2 Zip Code Lookup Uses XMLHttpRequest object to retrieve XML-formatted data without requiring a screen refresh. Data is retrieved from the server in the background. - Retrieves data from server in the background - DOM manipulation to parse XML document

© 2005 evoch, LLC XMLHttpRequest Object Methods MethodDescription abort()Aborts the current request getResponseHeaders()Returns all sets of response headers as a string getResponseHeader("label")Returns the value of the specified response header as a string open("method", "URL"[,asyncFlag[,"username"[, "password"]]]) Sets various request properties of the request including URL, method (get or post), and asynchronous handling flag. send(content)Sends the request along with optional POST content setRequestHeader("label", "value")Sets a header to be sent with the request

© 2005 evoch, LLC XMLHttpRequest Object Properties MethodDescription onreadystatechangeThe event handler that will be fired on change of state readyStateInteger indicating object status: 0 = uninitialized 1 = loading 2 = loaded 3 = interactive 4 = complete responseTextResponse from server in string format responseXMLDOM-compatible object of response data statusNumeric HTTP status code returned by server statusTextHTTP status message returned by server

© 2005 evoch, LLC Resources: Books (1/2) Dynamic HTML: The Definitive Reference, 2 nd Edition By Danny Goodman JavaScript: The Definitive Guide, 4 th Edition By David Flanagan HTML & XHTML: The Definitive Guide, 5 th Edition By Chuck Musciano, Bill Kennedy

© 2005 evoch, LLC Resources: Books (2/2) Cascading Style Sheets: The Definitive Guide, 2 nd Edition By Eric Meyer Eric Meyer on CSS By Eric Meyer More Eric Meyer on CSS By Eric Meyer

© 2005 evoch, LLC Resources: Online W3C Website css-discuss listserv css-discuss Wiki JavaScript Message Board XMLHttpRequest() Information

© 2005 evoch, LLC Resources: Developer Tools Web Developer Extension for Firefox and Mozilla By Chris Pederick LiveHTTPHeaders for Firefox and Mozilla By David Savard Web Development Tools built into Firefox and Mozilla By Mozilla.org IE DOM Inspector for Internet Explorer (not free) By IEInspector Software, LLC

© 2005 evoch, LLC Closing Questions? Download Presentation and Source Code Contact Info Mosh Teitelbaum evoch, LLC