1 comp519: Web Programming Fall 2005 Emerging technologies  Dynamic HTML DOM1, attributes & methods event handling, visibility, drag&drop  XML XML &

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

A really fairly simple guide to: mobile browser-based application development (part 1) Chris Greenhalgh G54UBI / Chris Greenhalgh
COMPSCI 345 / SOFTENG 350 TUTORIAL WEEK 8 | SAM KAVANAGH.
Markup Languages Controlling the Display Of Web Content.
Chapter 16 Dynamic HTML and Animation The Web Warrior Guide to Web Design Technologies.
Chapter 9 Introduction to the Document Object Model (DOM) JavaScript, Third Edition.
Copyright © 2003 Pearson Education, Inc. Slide 1-1 Created by Cheryl M. Hughes, Harvard University Extension School — Cambridge, MA The Web Wizard’s Guide.
Mgt 240 Lecture Website Construction: Software and Language Alternatives March 29, 2005.
Chapter 14 Introduction to HTML
1 Events Lect 8. 2 Event-driven Pages one popular feature of the Web is its interactive nature e.g., you click on buttons to make windows appear e.g.,
DHTML - Introduction Introduction to DHTML, the DOM, JS review.
Creating a Simple Page: HTML Overview
HTML 5 New Standardization of HTML. I NTRODUCTION HTML5 is The New HTML Standard, New Elements New Attributes Full CSS3 Support Video and Audio 2D/3D.
Chapter 16 The World Wide Web. 2 Chapter Goals Compare and contrast the Internet and the World Wide Web Describe general Web processing Write basic HTML.
INTRODUCTION TO DHTML. TOPICS TO BE DISCUSSED……….  Introduction Introduction  UsesUses  ComponentsComponents  Difference between HTML and DHTMLDifference.
Creating a Basic Web Page
Chapter 16 The World Wide Web Chapter Goals Compare and contrast the Internet and the World Wide Web Describe general Web processing Describe several.
Chapter 16 The World Wide Web. 2 The Web An infrastructure of information combined and the network software used to access it Web page A document that.
NetTech Solutions Working with Web Elements Lesson 6.
SEG3210 DHTML Tutorial. DHTML DHTML is a combination of technologies used to create dynamic and interactive Web sites. –HTML - For creating text and image.
JavaScript II ECT 270 Robin Burke. Outline JavaScript review Processing Syntax Events and event handling Form validation.
CNIT 133 Interactive Web Pags – JavaScript and AJAX JavaScript Environment.
DOM and JavaScript Aryo Pinandito.
Chapter 1 Understanding the Web Design Environment Principles of Web Design, 4 th Edition.
Week 1 Understanding the Web Design Environment. 1-2 HTML: Then and Now HTML is an application of the Standard Generalized Markup Language Intended to.
Chapter 1 XHTML: Part I The Web Warrior Guide to Web Design Technologies.
Learning Web Design: Chapter 4. HTML  Hypertext Markup Language (HTML)  Uses tags to tell the browser the start and end of a certain kind of formatting.
3 XHTML.
SEG3210 DHTML Tutorial. DHTML DHTML is a combination of technologies used to create dynamic and interactive Web sites. –HTML - For creating text and image.
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.
Sheet 1XML Technology in E-Commerce 2001Lecture 1 XML Technology in E-Commerce Lecture 1 WWW, HTML, CSS, XML, Meta-modeling.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
Intro. to XML & XML DB Bun Yue Professor, CS/CIS UHCL.
Lesson13. JavaScript JavaScript is an interpreted language, designed to function within a web browser. It can also be used on the server.
JavaScript, Fourth Edition
CSC 551: Web Programming Fall 2001 emerging & alternate Web technologies  Dynamic HTML  ActiveX  XML course overview  online review sheet  advice.
An Introduction to JavaScript Summarized from Chapter 6 of “Web Programming: Building Internet Applications”, 3 rd Edition.
XML 2nd EDITION Tutorial 1 Creating An Xml Document.
DHTML - Introduction Chapter Introduction to DHTML, the DOM, JS review.
Chapter 1 Understanding the Web Design Environment Principles of Web Design, 4 th Edition.
HTML: Hyptertext Markup Language Doman’s Sections.
DHTML: Working with Objects Creating a Dynamic Web Page.
Introduction to Programming the WWW I CMSC Summer 2003 Lecture 7.
Introduction to XML This presentation covers introductory features of XML. What XML is and what it is not? What does it do? Put different related technologies.
 2004 Prentice Hall, Inc. All rights reserved. Chapter 13 - Dynamic HTML: Object Model and Collections Outline 13.1 Introduction 13.2 Object Referencing.
Lecture 10 JavaScript: DOM and Dynamic HTML Boriana Koleva Room: C54
Introduction to Programming the WWW I CMSC Winter 2003 Lecture 10.
Cs332a_chapt10.ppt CS332A Advanced HTML Programming DHTML Dynamic Hypertext Markup Language A term describing a series of technologies Not a stand-a-lone.
Web Application Programming Presented by: Mehwish Shafiq.
By Tharith Sriv. To write a web page you use: HHTML (HyperText Markup Language), AASP (Active Server Page), PPHP (HyperText Preprocessor), JJavaScript,
TOPIC II Dynamic HTML Prepared by: Nimcan Cabd Cali.
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.
Copyright © 2003 Pearson Education, Inc. Slide 1-1 Created by Cheryl M. Hughes The Web Wizard’s Guide to XHTML by Cheryl M. Hughes.
HTML HYPER TEXT MARKUP LANGUAGE. INTRODUCTION Normal text” surrounded by bracketed tags that tell browsers how to display web pages Pages end with “.htm”
Introduction to the World Wide Web & Internet CIS 101.
Chapter 10 Dynamic HTML (DHTML) JavaScript, Third Edition.
JavaScript and Ajax (JavaScript Environment) Week 6 Web site:
Web Design Principles 5 th Edition Chapter 3 Writing HTML for the Modern Web.
Project 1 Introduction to HTML.
Microsoft Office Illustrated
Prepared for Md. Zakir Hossain Lecturer, CSE, DUET Prepared by Miton Chandra Datta
DHTML Javascript Internet Technology.
DHTML Javascript Internet Technology.
Introduction to Programming the WWW I
Introduction to DHTML, the DOM, JS review
Web Programming and Design
Presentation transcript:

1 comp519: Web Programming Fall 2005 Emerging technologies  Dynamic HTML DOM1, attributes & methods event handling, visibility, drag&drop  XML XML & CSS, XSL, DTD  ActiveX

2 Dynamic HTML chapters 5 & 6 describe more dynamic features of HTML  possible to change the appearance of HTML elements after loading Domain Object Model (DOM)  Level 0 (pre 1988): Netscape & Microsoft had different models for accessing page elements and modifying their attributes  Level 1 (1988): standard defined by World Wide Web Consortium (W3C) DOM1 consists of a collection of interfaces, similar to C++/Java API supported by all modern browsers  Level 2 (2000): specifies a style sheet object model & defines how style is handled mostly supported by Netscape/Mozilla, spotty coverage by IE  Level 3 (2004): in development but not yet adopted

3 DOM1 Document Object Model – Level 1 document attributes  document.title title of the page  document.referrer URL of document that linked to the page  document.domain domain name of server for the page  document.URL full URL of the page  document.lastModified data the page was last edited  document.cookie cookies associated with the page  document.images array of all image elements in the page  document.applets array of all applet elements in the page  document.anchors array of all anchor elements in the page  document.forms array of all forms in the page can access individual elements of these arrays using: document.images.card1.src = "as.gif"; document.images["card1"].src = "as.gif";

4 DOM1 methods document methods  document.open opens document stream for writing  document.write writes text to document stream  document.close closes document stream  document.getElementById accesses arbitrary page element, identified by its ID attribute <input type="button" value="flip" onClick="var c = document.getElementById('card'); if (c.src.indexOf('b.gif') != -1) { c.src = 'as.gif'; } else { c.src = 'b.gif'; }" />

5 Dynamic style modifications more useful: can change the appearance of page elements after loading  use getElementById to get a handle on the element  access the (CSS) style attribute by name (if style attribute has hyphen, remove and capitalize next letter) <img id="card" src="b.gif" style="border-style:solid; border-color:black" /> <input type="button" value="border" onClick="var c = document.getElementById('card'); if (c.style.borderColor == 'black') { c.style.borderColor = 'red'; } else { c.style.borderColor = 'black'; }" />

6 Dynamic text style attributes can be dynamically altered for any kind of page element Here is some plain text. <input type="button" value="align" onClick="var t = document.getElementById('changeme'); if (t.style.textAlign == 'left') { t.style.textAlign = 'center'; } else if (t.style.textAlign == 'center') { t.style.textAlign = 'right'; } else { t.style.textAlign = 'left'; }"> <input type="button" value="bold" onClick="var t = document.getElementById('changeme'); if (t.style.fontWeight == 'normal') { t.style.fontWeight = 'bold'; } else { t.style.fontWeight = 'normal'; }"> <input type="button" value="color" onClick="var t = document.getElementById('changeme'); if (t.style.color == 'black') { t.style.color = 'blue'; } else { t.style.color = 'black'; }">

7 Event handling and dynamic style attributes can combine dynamic style with event handling such as onClick, onFocus, onMouseOver, onMouseOut, … <img name="card" id="card" src="b.gif" style="border-style:solid; border-color:black;border-width=2" onMouseOver="this.style.borderColor='red';" onMouseOut="this.style.borderColor='black';" /> Here is some plain text.

8 Visibility and button labels it is possible to hide an element altogether using the visibility attribute can also change the label on buttons <img name="card" id="card" src="b.gif" style="border-style:solid; border-color:black; border-width=2; visibility:visible" onMouseOver="this.style.borderColor='red';" onMouseOut="this.style.borderColor='black';" />

9 Other common uses of DHTML pull-down menus, collapsing lists:  cs.creighton.edu cs.creighton.edu drag-and-drop (but cannot be done cross-platform without duplication) 

10 Extensible Markup Language (XML) protocol for representing structured data in text files  can represent arbitrary structures, define own abstractions  since raw text, easy to peruse/edit & platform-independent XML is a meta-language for designing your own markup language  like HTML, utilizes tags and attributes (e.g., ) however, HTML specifies what each tag & attribute means whereas, XML simply delimits pieces of data, no interpretation implied XML is meant to be read by applications, not people  formatting rules are very strict (missing tag or quotes invalidates file)  many applications have been developed that utilize XML as data format note: representing data as XML text is not the most efficient bitwise  disk space is cheap; compression tools can alleviate

11 XML & HTML HTML has been reformulated in XML (now known as XHTML 1.0)  an existing HTML document is valid XML as long as  first line is of form:  tags & attributes are lower-case, attribute values are in quotes  every opening tag has a closing tag (or else ends with />) e.g., can define own tags for structuring data Where was the Web invented? Microsoft Sun Microsystems CERN IBM

12 XML & CSS for simple viewing in a browser, can utilize a style sheet to specify format Where was the Web invented? Microsoft Sun Microsystems CERN IBM question.xml: ?xml tags identify content type, load CSS stylesheet question {display:block; font-size:120%; font-weight:bold;} question answer {display:block; margin-left:40px; font-weight:normal} question answer.correct {color:red} question.css: defines format for new elements

13 More advanced features can use a separate program to transform XML text into HTML can utilize Extensible Stylesheet Language (XSL)  similar to CSS, defines how XML elements are to be formatted  more powerful than CSS, customized for XML can use Document Type Declaration (DTD) to specify the element structure  include the DTD with the XML document automatically used to validate the element structure in the document <!DOCTYPE test SYSTEM "test.dtd"...

14 ActiveX ActiveX is a set of technologies from Microsoft  provides tools for linking (Windows) desktop applications to the Web.  ActiveX controls are the building block of applications e.g., text control to read user ID & password, button control to submit  similar to applets, but have full access to Windows OS  once downloaded to the client, the control automatically registers itself & becomes available to the browser  can automatically trigger a self-update if newer version is available thousands of ActiveX controls are available for download  can develop your own using Microsoft programming tools e.g., Visual Basic, Visual C++, Visual J++ ActiveX controls are integrated into Microsoft products e.g, can allow users to view Word and Excel documents directly in a browser

15 FINAL EXAM similar format to previous tests  true or false  discussion/short answer  explain or modify code (HTML, JavaScript, Java, CGI) cumulative, but will emphasize material since Test 2 designed to take 120 minutes, will allow full 150 minutes study hints:  review lecture notes  review text  look for supplementary materials where needed (e.g., Web search)  think big picture -- assimilate the material!  use online review sheet as a study guide, but not exhaustivereview sheet