`
`Scott Isaacs
`
`MicresoftPress
`
`ue
`
`
`
`:
`
`1
`
`Exhibit 1035
`Samsungv. DoDots
`IPR2023-00701
`
`1
`
`Exhibit 1035
`Samsung v. DoDots
`IPR2023-00701
`
`
`
`
`
`CONTENTS
`
`ACKNOWIECGMENES.ossecvssrsssnsnnenseneaneenentenesnesnsnsnesseaceussutiusnsissensyseicassevessenvansera vii
`INMFOCHUCHION.........caavaststsnsaisivieasnatiovinbnstignsehdsbabionaiiiahaesillne ubissaii a ius ix
`
`PART i: HTML AND SCRIPTING
`CHAPTER ONE
`
`Overview of HTML and CSS 3
`New HTMLFeatures.....
`
`
`Cascading Style Sheets
`Examining an HTML DTD... ccc ccscueeee
`
`CHAPTER TWO
`
`Fundamentals of HTML Scripting 34
`Dynamic HTML Object Hierarchy
`
`Authoring Scripts....
`
`Choosing a Scripting Language: JavaScript vs. VBScript
`Advanced JavaScript Techniques ..0.0.........cccccccccccccscecssssssseassennenee 50
`Scripting and Web Security
`
`CHAPTER THREE
`
`Dynamic HTML Event Model 57
`General Event Model «00.00.
`Event Binding...
`The event Object... ee
`Programming Standard User Events
`
`Event Examples oo...
`
`PUBLISHED BY
`Microsoft Press
`A Division of Microsoft Corporation
`One Microsoft Way
`Redmond, Washington 98052-6399
`Copyright © 1997 by Scott Isaacs
`All rights reserved. No part of the contents of this book may be reproduced or
`transmitted in any form or by any means withoutthe written permission of the publisher.
`Library of Congress Cataloging-in-Publication Data
`Isaacs, Scott, 1971-
`Inside Dynamic HTML/ Scott Isaacs.
`Pp.
`cm.
`Includes index.
`ISBN 1-57231-686-1
`1. HTML (Document markup language)
`QA76.76.H94183
`1997
`005.7'2--de21
`
`1. Title.
`
`97-33678
`CIP
`
`Printed and bound in the United States of America.
`
`123456789 QMOM 210987
`Distributed to the book trade in Canada by Macmillan of Canada,a division of Canada
`Publishing Corporation.
`A CIP catalogue record for this bookis available from the British Library.
`Microsoft Press booksare available through beoksellers and distributors worldwide. For further
`information aboutinternational editions, contact your local Microsoft Corporation office. Or
`contact Microsoft Press International directly at fax (425) 936-7329. Visit our Website at
`mspress.microsoft.com.
`Java is a rademark of Sun Microsystems, Inc, Microsoft, Microsoft Press, the Microsoft Press logo,
`Visual Basic, Visual C++, Windows, Windows NT, and the Windowslogo are registered trade-
`marks and ActiveX,JScript, and the Microsoft Internet Explorer logo are trademarks of
`Microsoft Corporation. Other product and company names mentioned herein maybe the
`trademarks of their respective owners.
`Acquisitions Editor: Eric Stroo
`Project Editor: Patricia Draher
`Manuscript Editor: Jennifer Harris
`Technical Editors: Gary Nelson and Kurt Meyer
`
`
`
`2
`
`
`
`eeeeee
`
`INSIDE DYNAMIC HTML
`
`Contentsooo
`
`CHAPTER FOUR
`The Browser Window 89
`The window Object oo...occ ccsssessusessetsetscscusacnsaneeseeseeee 90
`
`The Window Environment..
`a: 92
`
`Window Events on.
`. 97
`Timer Events 200.0... ccccecececececeeneneeeeeeteene
`we. 102
`
`The clientinformation or navigator Property...
`.. 108
`CHAPTERFIVE
`
`Window and Frame Management 113
`Manipulating the Window ooo... cece eeeessececeeneserraearavanenes 114
`
`Creating New Windows...
`wee 116
`
`Manipulating Framesets..
`vee 130
`Special Event Considerations..
`.. 144
`
`
`PART tt: DOCUMENT STRUCTURE
`CHAPTER SIX
`The HTML Document 149
`aeeloil
`Referencing the document Object...
`
`aap 151
`Changing the Document’s Colors...
`ws 155
`Accessing Meta Information About the Document..
`
`.. 164
`Modifying the HTML Stream .........00000 Pr
`CHAPTER SEVEN
`Document Element Collections 167
`
`«» 168
`Using the Collections oo.ie i
`The HTMLStructure and Collections....
`V7
`
`
`CHAPTER EIGHT
`
`Scripts and Elements 189
`Identifying Elements 20.2.0... ccccccccesesssesseeceesenneneeee
`.. 190
`
`Accessing an Element’s Attributes
`192
`Parsing Information ......0.00.0....
`.. 196
`Creating New Elements...
`». 200
`
`Customizing Elements....
`. 201
`
`CHAPTER NINE
`
`Scripting Individual Elements 207
`
`... 208
`Programming the Body and Frameset Elements
`- 216
`
`Programming the Anchor Element
`. 222
`Programmingthe Link Element.....
`
`226
`Programming the IMG and Map Elements.
`
`. 237
`Programming the Marquee Element....
`
`239
`Programming the Object Element.
`.. 240
`Programming the Table Element.......
`
`CHAPTER TEN
`
`Forms and Intrinsic Controls 254
`FITML Forms ooo. ceeccseenescereseaeavsscanesensseeesessescecevevsesvsnvavavaes 252
`
`Programming Text Input Elements...
`262
`
`Programming List Elements..............
`sue 200
`
`Programming Lists Using Radio Buttons and Check Boxes......... 277
`
`Programming CommandButton Elements..........0.0.0.0.0..00000 we 280
`Programming Label and Fieldset Elements ...........0.00000.0..ccc00: 283
`
`PART ttt: DOCUMENT STYLE AND ANIMATION
`CHAPTER ELEVEN
`
`Dynamic Styles 287
`Dynamic Styles and CSS oot susteenseenernieness 288
`. 289
`Style Sheet Properties ...
`Inline Styles...
`wo 291
`
`Changingthe class Attribute
`eve 292
`Global Style Sheets ...............
`wank
`wn 295
`Adaptive Layout Techniques
`Ssisnaasaaeide||
`ines S16
`Data Display Techniques..........
`
`Text Animation Techmiquess 2.000.0.00.00.0c0ccccccccicsscecsesseseeesessseeeeneeeeerevneee B25
`CHAPTER TWELVE
`
`Dynamic Positioning 329
`CSSPositioning.
`Scripting CSS Positioning .
`The Rendering Context......
`
`
`
`.. 830
`-» 339
`a. 356
`
`3
`
`
`
`INSIDE DYNAMIC HTML
`
`
`
`
`
`Part iv: DOCUMENT CONTENTS AND
`DATA BINDING
`CHAPTER THIRTEEN
`
`Dynamic Contents 371
`Contents Manipulation. ..............
`Dynamic Contents Properties ..
`
`Dynamic Contents and document.write.... .. 387
`
`CHAPTER FOURTEEN
`
`User Selection and Editing Operations 395
`
`. 396
`Introducing the TextRange Object.....
`399
`Programming the TextRange Object .
`
`409
`Accessing the User’s Selection..
`
`+ 410
`Executing Commands..................
`CHAPTER FIFTEEN
`
`Data Binding with HTML 413
`WhatIs Data Binding? 0... ccccceeeesesueetseetsateeerensesererennene 415
`Data-Binding Architecture ...............
`416
`
`sg
`Data Consumers: HTML Elements..
`» 422
`Building Basic Pages Using Data Binding..
`431
`
`Writing Scripts Using Data Binding.............
`sue 437
`AdvancedFeatures...
`we 445
`
`TADOX occ tctecceteteereeeees
`.. 451
`
`ACKNOWLEDGMENTS
`
`The foundationsfor this bookwere built from presentations I’ve made on Dy-
`namic HTML.Theissues and questionsraised served as the basis for this book’s
`organization and samples. To everyone who has heard me speak and asked a
`question, thank you.
`To the entire Microsoft Internet Explorer 4.0 team—especially the Tri-
`dent team—without yourhard work,the vision of Dynamic HTMLwould never
`have been achieved. Thankstoall the individuals at Microsoft, too numerous
`to list, who previewed and helped improve the book.
`To Richard Rollman,a special thanksforall his help with the chapter
`“Data Binding with HTML.”Mythanksalso go to the Microsoft Press team for
`producing the book and the companion CD.
`Andfinally, thanks to my wonderful wife, Jocelyn. Without her patience
`and support, this book would never have beenwritten or finished.
`
`vi
`
`vii
`
`4
`
`
`
`
`
`“ windew,
`TSTE4-
`=" CHS3%
`:
`“(Cparselint(navidatoga
`
`ei ANev ide torappverstor
`
`INTRODUCTION
`
`The World Wide Web ignited a computer revolution by enabling anyone to
`publish HTML documents. Until recently, the information in these documents
`was mostly static, requiring the server to respond to userinteractions. With the
`introduction of Dynamic HTML, the Web paradigm hasshifted away from
`requiring server interactionsto creating interactive Web sites and Web appli-
`cations. Because Dynamic HTMLallows HTML documentsto interact with the
`user and change completely on theclient, you can create rich Web applications.
`Dynamic HTMLis built on an object model that extendsthe traditional
`static HTML document. This book introduces you, the Web developer, to Dy-
`namic HTMLandteaches you howto create pages that are live and interac-
`tive on the client. This book assumes a working knowledge of HTMLandbasic
`programming principles. It does not teach you HTML or show you how to
`program inJavaScript,JScript, or VBScript; instead, these languages are used
`as tools for dynamically manipulating the page.
`Near the endofthis introduction, you'll find a description of the four
`parts of this book. Before continuing, read this overview to get a feel for how
`Dynamic HTMLwill be presented here throughaseries ofbuilding blocks. By
`the endofthis book,all the pieces for creatinglive and interactive Web pages
`will be in place.
`
`Creating Interactive Pages
`The concept of creating interactive Web pages is not new—Microsoft and
`Netscapeinitially defined a simple object model that was presented as a way
`ofcreating interactive pages. On closer inspection, the object model was found
`to be efficient only for basic form validation. Dynamic documents were mostly
`a myth prior to Microsoft Internet Explorer 4.0 because the only time a page
`could change was duringits creation. Interactive documents were simulated
`by completely reloading the page or by embedding objects in the page. Many
`of theseJava applets, ActiveX controls, and even animated GIFs were designed
`to perform textlike manipulation, which provided a way to work around the
`static nature of HTML.However, using objects as a replacementforstyle and
`contents control is a poor solution.
`
`5
`
`
`
`INSIDE DYNAMIC HTML
`eee
`
`Introduction
`
`After examining manyofthe scenarios for these objects and animated
`GIFs, Internet Explorer developersrealized the need for a more powerful API
`(application programminginterface) for manipulating documents. With an
`object modelthatprovidesfull access to the document,authors can take advan-
`tage of the layoutabilities built into HTML and CSS (CascadingStyle Sheets).
`This object model greatly improves performance by reducing the need for
`downloading large animated GIFs and applets. Information becomesinstan-
`taneously accessible becauseit is no longer hidden within images or objects.
`Dynamic HTMLprovides the API necessary for complete controlover the
`HTML document. Nolonger does a page need to be defined whileit is load-
`ing. After loading, any portion of the page can be dynamically and immedi-
`ately changed.For example, you can create an application that has expanding
`and collapsing outlines. When the user expandsorcollapses the outline, the
`contents are displayed or hidden instantaneously. Imagine being able to cre-
`ate pagesthat can automatically change andtailor themselvesto the user. All
`this and moreis possible with Dynamic HTML.
`Theability to modify a document and have the dacument automatically
`reflowitself is the underlying innovation used throughout Dynamic HTML.
`Traditional browsers were basically document navigation tools that displayed
`a documentandthen waited for the user to point to a new document. When
`a change to the documentwas needed, either a request was sent to the server
`for a new page or an entire new page was generated ontheclient.
`
`Programming Languages
`A programming language is used to manipulate the Dynamic HTML object
`model, but Dynamic HTMLis designed to be platform independentand lan-
`guage neutral. Therefore,JavaScript,JScript, VBScript, C++,Java, or any other
`programming language can be used as the language of choice.
`This bookuses primarilyJScript for accessing the document object model.
`JScriptis Microsoft's implementation of the EGMA262 (European Computer
`Manufacturers Association) standard designed by Microsoft, Netscape, and other
`organizations. This standard formalizesthe language constructs ofJavaScript
`andScript so that interoperable implementations can be created.It is impor-
`tant to rememberthatthis standard defines only the constructs of the lan-
`guage. Even though the languageis often associated with the object model,
`this standard does not define the object model. Therefore, when you are de-
`termining whether a browser supports a version ofJavaScript or JScript, you
`mustbe carefulto distinguish whether an object modelor a language feature
`is being discussed. The JScript in Internet Explorer4.0 is compliant with the
`ECMA standard,but the implementation ofJavaScript 1.2 in Netscape 4.0 is not.
`
`NOTE: The terms javeScript and JScript can generally be used
`interchangeably to refer to the programming language. JavaScript
`is used throughout this book because it is more widely recognized.
`Applets and objects on the page can also communicate with the page. For
`example, in Internet Explorer, an object written in Java, C++, or some other
`language can communicate with the page through the object model. The tech-
`niqueforcreating applets that use Dynamic HTMLis beyondthe scopeofthis
`book. However, this book does provide a foundation for understanding the
`Dynamic HTMLcapabilities available to such objects.
`If you are familiar with the existing JavaScript language and existing ob-
`ject model, you'll find that the extensions for the Dynamic HTMLobject model
`are a fully compatible superset. Any pages written for past versions of Internet
`Explorer or for Netscape Navigator 3.0 will continue to run in Internet Ex-
`plorer 4.0. This compatibility allows Web developers to take advantage of their
`existing skills as they learn about these new innovations. If you are new to
`JavaScript, learning how to program the HTMLpage allowsyou to extend and
`enhanceyourpagesand yourusers’ experience in ways never before possible.
`
`New Features
`Dynamic HTML removesall restrictions on access to the document. Dynamic
`HTMLin Internet Explorer 4.0 empowers developers with a number of new
`features, which are discussed in the following sections.
`
`Internet Explorer 4.0 sup-
`= HTML 4.0 and advanced CSS support
`ports the latest HTML 4.0 standard, CSS1, and manyof the new CSS
`enhancements. These HTML and CSS standards define whatis ex-
`posed by the Dynamic HTML object model.
`i Full access to the document's structure All elements in the docu-
`mentare available through the Dynamic HTML object model. You
`are no longerlimited to scripting the form elements. Thestyle and
`contents of any element can be dynamically changed, and these
`changeswill be immediately reflected in the document.
`In addition, the intrinsic controls have been enhancedto better
`support HTMLand CSS, which allows the Web author to manipu-
`late the appearance of these controls—includingsetting the text
`color, background color, and font—on buttons and text controls.
`The object model behind the intrinsic controls is similar to the ob-
`ject model behind the documentand allows easy access to the style
`and contents.
`
`xi
`
`6
`
`
`
`INSIDE DYNAMIC HTML
`
`Introduction
`
`@ Dynamic style The document's CSS style sheets can be changed at
`any time. The documentdoes not need to reload from the cache or
`communicate with the server. The object model is designed to allow
`a page to display any changes immediately. For example, the appear.
`ance of an element can change as the user moves the mouse or
`clicks onit.
`
`goal of this groupis to define an object modelthatis language independent
`and platform neutral and that meets a set of requirementsfor structured docu-
`ments. The object model defined in Internet Explorer 4.0 meets most of the
`requirements outlined by the Document Object Model working group.
`
`m@ Dynamic contents The object modelallows the contents of the
`document to be accessed and changed. Again, no server communica-
`tions are involved, and the response is intendedto be instantaneous.
`For example, you can write a ticking clockutility in standard HTML.
`You no longer need Java applets or ActiveX controls to change
`contents.
`
`Defining an HTML Document
`HTMLis anapplication SGML (Standard Generalized Markup Language). In
`an SGML/HTML document, tags add structure to the document's contents.
`A traditional SGML documenthasthreedistinct aspects: structure, style, and
`contents. With the introduction of Dynamic HTML, HTML nowincludes a
`fourth component: behavior. The term behavior refers to the interaction be-
`tween the HTMLpage andtheuser. This book’s primary focusis on creating
`@ Instant user response Dynamic HTML provides a powerful new
`HTML-based applications by manipulating the different components of the
`event model that exposesall user actions to the page. Scripts in a
`document. Structure is exposed througha set of elementcollections;style is
`documentcan respondto all the user’s actions within the browser.
`exposed on each element and throughastyle sheets collection; and contents
`Based on the user’s actions, any aspect of the document’s contents
`are exposed through each element and through a TextRange object. Scripts
`orstyle can be dynamically changed.
`manipulate structure, style, and contents in response to events to produce a
`document’s behavior.
`@ Client/server web pages
`Internet Explorer 4.0 adds extensions to
`HTMLelementsto create data-boundtables and single-record forms
`and reports. Data is asynchronously downloaded and rendered in
`the documentusing a few basic HTMLextensions. The data can be
`cachedlocally, allowing client-side searching and sorting without
`requiringassistance from the server. For example, search engines
`don’t need to provide only a few matchesat a time. Instead, a search
`engine can send responsesto the client, where they are rendered as
`they are received. The user can immediately sort and furtherfilter
`the data entirely on the client, without sending subsequent requests
`to the server.
`
`Internet Explorer4.0 tightly in-
`® Multimedia and animation effects
`tegrates multimedia and animation effects with the document's con-
`tents. These effects includefilters that can simulate light sources
`and shadows andothereffects that operate directly on text or con-
`trols. Transition effects between images and text, and even between
`pages, cau also be added.
`
`All of these features are based on currentdiscussion within the working
`groups of the W3C (World Wide Web Consortium). The Dynamic HTML object
`modelis being reviewed by the Document Object Model working group. The
`
`Structure and Style
`Structure provides context for the information contained within a document.
`For example, the Header elements H1 through H6 are meantto define vari-
`ous headers andtheir relative importance. An H1 element mightbe followed
`by another H1 or an H2 but should not be followed by an H3 element. As
`HTMLquickly evolved, however, the separation between structure and presen-
`tation was often ignored. Authors used HTMLtagsnotas a way to provide
`structure but as a way to define style. The H1 elementwasoften used to mean
`big, bold text rather than to indicate top-level headers. As a further deviation
`from SGML,stylistic tags were invented. For example,the <B> and <I> tags were
`introduced to mark boldanditalic text.
`Whenviewinga page, the user (and many times the author) usually does
`not care aboutstructure. The author’s goalis to create an interesting page that
`will hopefully increase the numberofhits, or visits, the Website receives. This
`desire for originality was thejustification for many ofthestylistic tags that were
`created.
`Abusing style does have consequences, however. For one, tools become
`less powerful. If an authorcorrectly uses structure, an indexing tool can more
`intelligently index the document's contents. If the <STRONG>tag is used to
`
`xiii
`
`7
`
`
`
`INSIDE DYNAMIC HTMLee
`
`Introduction
`
`as the following chapterswill show, manipulating invalid HTMLis more dif-
`ficult and might create unpredictable behavior.
`
`The Organization of This Book
`Learning to program interactive pages is a cumulative process. This book be-
`gins by explaining basic concepts and then builds on these concepts to teach
`you how to access the different componentsof the browser and the document.
`The following sections provide an outline of the four parts of this book.
`
`HTML andScripting
`Chapters 1 through 5 introduce the relationship between scripting and the
`HTMLdocument, describe the browser window, and show you howto use the
`Dynamic HTML event model. This book assumes a working knowledge ofHTML
`and programming in eitherJavaScript or VBScript.
`Part I introduces the object hierarchy, which exposes the fouraspects of
`the document: structure, style, contents, and behavior. These aspects are dis-
`cussed in detail in Parts IT through IV, andsince these areasare closely related,
`the explanations overlap somewhat.
`
`Part I:
`
`Part Il
`
`indicate that a wordis of importance,an indextool can assign a greater weight.
`However, many authors use <STRONG>simply to display words in boldface,
`rather than to indicate they have greater importance,invalidating the usefulness
`of the tag.
`Amore important reason for properly structuring your pageis to improve
`accessibility to the underlying information. Imaginea browserthat speaks the
`information rather than displays it—perhaps a browserfor visually impaired
`users or even a voice-based browserin yourcar. This browser needsto be able
`to extract various connotationsfrom the text. Strong words should be spoken
`with greater emphasis, and headers should provide an outline of information
`on the page. Ifa documentused markupfor presentation only, the voice-based
`browser would notbe able to properly deliver the document.
`HTMLalso definesa set of rules representing the properstructureof the
`document. A DTD (documenttype definition) describes which elements can
`be contained within other elements.It is important to understandthatnotall
`HTMLelements should be included anywhere within a document. Usually,
`when a Web page renders poorly across browsers, it is due to HTMLthatfails
`to conform to the DTD. Unfortunately, manyof the pages on the Web do not
`conform to any HTML DTD,andrather than force users to define correct
`documents, browsers have evolved a lax set of rules for parsing the document
`that attemptto interpret the author’s intent—often withless than idealresults.
`: DocumentStructure
`Until mid-1996, style in HTMLwascontrolled quite simply by using tags
`In Dynamic HTML,all elements andtheirattributes are available program-
`andstylistic attributes, such as ALIGN. Underthese conditions, HTML was
`matically. Part If shows you howto access and take advantage of the document
`failing to be a true SGMLlanguage,in which structure and style are defined
`elementcollections and how to manipulate the individual elements within the
`separately. In a true SGMLlanguage, a documentcan havean associatedstyle
`document.This part also demonstrates how to create rich, interactive forms that
`sheet that defines how the structural elements are rendered. SGMLprovides
`can process information onthe client without requiring round-tripsto the server.
`a numberoflanguages for definingastyle sheet.
`In mid-1996, a new language named Cascading Style Sheets was intro-
`ducedfor specifying style in HTML.The CSSspecification was coauthored by
`Bert Bos and HakonLie of the W3C,with input from manyW3C members, and
`has been adoptedby the major browser implementations. Basically, with CSS
`a Strong element(and even a Bold element,for that matter) no longer indi-
`cates boldface text. Instead, the Strong elementretainsits traditional purpose,
`to indicate an important word.A style sheet now specifies that Strong element
`text should be rendered in boldface:
`STRONG {fant-weight:bold}
`
`To take full advantage of Dynamic HTML,your documentshould prop-
`erly separate the contents andstructure from the presentation. Dynamic HTML
`is easier to use and works more predictably with valid HTML documents. And
`
`xiv
`
`Part Ill: Document Style and Animation
`Tightly coupled with individual elementsis the concept ofstyle, the topic of
`PartIII. Usingstyle sheets, the Web author can specify the document's appear-
`ance, spacing, colors, and so on.
`Part III also shows you how to add basic animation to an HTMLpage.
`Dynamic HTMLexposesa set of memberfunctions that enable an HTML
`elementto float and move over the HTMLpage,allowingthe creation of simple
`presentation-like effects. In addition, Dynamic HTMLincludesa set of pow-
`erful extensions that let you add real multimedia animation and transition
`effects to your Web page. With these enhancements, the HTMLcontents can
`be animated using only a few lines of code.
`
`xv
`
`8
`
`
`
`INSIDE DYNAMIC HTML
`
`Part IV: Document Contents and Data Binding
`Part IV demonstrates how Dynamic HTMLallows pages to dynamically reshape
`themselves. The contents are exposed through properties on each element
`and through a text object model. With dynamic contents, HTMLtext and
`unformatted text can beeasily accessed and changed.
`Chapter15, “Data Binding with HTML,’ showsyou howto use Dynamic
`HTMLtocreate client/server Web pages, including binding an HTMLtable
`to a set of data that can belocally manipulated. This feature allows you to
`create high-speed data-aware pages that can besorted,filtered, and bulk-
`edited—all on the client,
`
`Companion CD
`The companion CD includes the sample code from the book, togetherwith an
`indexing page that containslinksto all the samples and can sort andfilter the
`links to help you find particular programs quickly.
`Also on the CD are copies of Microsoft Internet Explorer 4.0 and the
`Microsoft Internet Client Software Development Kit. The documentation in
`the SDK includes a complete reference to Dynamic HTMLaswell as other
`helpful information,
`The author’s personal Web site (www.insideDHTML.com)is a great
`source for additional information about Dynamic HTML. Microsoft main-
`tains several Websites related to Dynamic HTML, including the Site Builder
`(www.microsoft.com/sitebuilder) andJScript (www.microsoft.com/JScript)
`sites.
`
`Support
`Every effort has been madeto ensure the accuracy of this book and the con-
`tents of the companion CD. Microsoft Press provides corrections for books
`through the World Wide Web at mspress.microsoft.com/mspress/support/ If
`you have comments, questions, or ideas regarding this book or the compan-
`ion CD, please send them to Microsoft Press using postal mail or e-mail:
`Microsoft Press
`Atin: Inside Dynamic HTML Editor
`One Microsoft Way
`Redmond, WA 98052-6399
`MSPINPUT@MIGROSOFT.COM
`
`Please note that product supportis not offered through the above mail addresses.
`
`xvi
`
`
`
`HTML AND
`SCRIPTING
`
`
`
`9
`
`
`
`prghetets
`Srigaes
`Beeea uta
`eaten engi
`eaeaeBeene
`
`i
`
`ees i ot i
`red
`aE
`Fy
`zh
`nie Hip
`
`eeHe
`
`i
`
`Overview of HTML and CSS
`
`Hr (Hypertext Markup Language) is continually evolving. Within the past
`year and a half, two major innovations have extended HTML: anentirely new
`language for controlling style, and an object model for adding behavior and
`dynamism to documents. Dynamic IITMLin Microsoft Internet Explorer 4.0
`encompasses not only the object model for manipulating the document, but
`also many ofthe latest HTML and CSS (Cascading Style Sheets) recommen-
`dations and working drafts from the W3C (World Wide Web Consortium).
`This chapterintroduces someofthe recent innovations to HTMLand CSS
`supported by Microsoft Internct Explorer 4.0. The combination ofexisting
`HTMLfeatures and these newinnovations with the Dynamic HTML object.
`mode!allows you to create interactive Web pages and Web applications. This
`chapteris not a comprchensive review of HTML and CSS—theeffective use
`of HTMLand CSSis a topic for an cntire book. Rather, this chapterlets you,
`the Web author, familiarize yourself with the latest work in these arcas.
`The following topics are covered in this chapter:
`© New HTMLfeatures This section introduces some of the new fea-
`tures that will be included in the next version of HTML. This next
`version of HTML, HTML4.0, is being designed by the W3Candits
`members. By the time you read this book, the HTML 4.0 recom
`mendation by W3Cwill probablybe final. This section also intro-
`duces HTMLfeatures supported by Internet Explorer 4.0 that go
`beyond HTML4.0.
`®@ Cascading Style Sheets The intent of SGML (Standard General-
`ized Markup Language), and therefore of HTML,is to separate
`contents from presentation. This separation wasnotpossible before
`the introduction of CSS, when tags such as <B> and <FONT> were
`incorporated in HTMI.to indicate how content was to be pre-
`sented. These tags violate the fundamentals of a structured docu-
`mentby allowing the presentation to be embedded in the contents.
`
`10
`
`10
`
`
`
`
`
`I: HTML AND SCRIPTING
`
`ONE: Overview of HTML and CSS
`
`Explorer 4.0 expands onthe earlier version by providing supportfor the rest
`of the features in the precedinglist. For information about HTML 4.0 and
`these features, check out the W3C Website (www.w3.org) and Microsoft's Web
`site (www.microsoft.com). The scripting of these new elementsandattributes
`is discussed throughoutthis book.
`The rest of this section introduces the HTMLsyntax for the Objectele-
`ment, form andaccessibility enhancements, and a few other HTMLfeatures
`supported by Internet Explorer 4.0 that go beyond HTML4.0.
`Chapter 2, “Fundamentals of HTMLScripting,’ focuses on the Script
`element, the primary mechanism for embedding scripts in the document.
`Framesetsare introduced in Chapter 5, “Window and Frame Management.”
`The table enhancementsare not discussed in detail in this book. These
`enhancementsinclude specifying table headers, footers, and bodies as well as
`providing greater control over columns. More information aboutthe table
`enhancements can be found at the Microsoft Website.
`A named entity consists of predefined characters that can be embedded
`in the document using &name;. For example, a commonly used namedentity
`is the nonbreaking space (&mbsp;), which inserts a space that won't wrap at a
`line break in the document.
`
`Embedding Custom Objects
`The Object elementis used to embed custom objects in an HTML document.
`This elementwasinitially supported in Internet Explorer 3.0. The Objectele-
`mentis used to extend HTMLby embedding Java applets, ActiveX controls,
`and supported MIMEtypes in Internet Explorer. Supported MIMEtypesin-
`clude HTMLfiles andthe various image formats, such as GIF,JPEG, and PNG,
`The syntax for the Object elementis generally as follows:
`<OBJECT CLASSID="ActiveX UUID" WIDTH="pixels" HEIGHT="pixels'>
`<PARAM NAME="property" VALUE="propertyValue">
`</OBJECT>
`In addition to specifying the CLASSID,an optional CODEBASEparameter can
`be specified to provide a location from which to download the object. Param-
`eters can be specified through one or more Param elements contained within
`the Object element.
`Theonly valid contents within an Object element are Param elements.
`Browsers that support the Object element ignore all other HTML within the
`
`This section introduces the CSS language andits relationship to
`the recentscripting additions. CSSis a static representation for add-
`ing style to a document, but through the object model extensions,
`thatstyle can be dynamically changed. For example,thestyle of
`text can be changed based on the user’s environment.
`@ Examining an HTML DTD HTMLis a structured language with a
`formaldefinition. This section discusses the importance of the DTD
`(document type definition) that defines HTML. The HTML DTDis
`the SGMLdeclaration of the HTML language. A DTD defines the
`supportedset of elements and their attributes and specifies whether
`an element can contain other elements. Unfortunately, the majority
`of pages on the Web violate the HTML DTD. With the addition of
`an object modelthat exposes the entire page to scripting, ensuring
`consistent and rational behavior by creating properly structured
`documents takes on greater importance.In this section, you'll learn
`how to read a DTD anduseit to create valid HTML documents.
`
`New HTML Features
`Internet Explorer 4.0 adds full support for HTML4.0, the next version of
`HTMLto be embodied as a W3C recommendation. This section introduces the
`features newly incorporated into HTML4.0. (Some of these features were
`available in Internet Explorer 3.0 but are only now being incorporated into a
`W3C recommendation.) At the time this book was written, HTML 4.0 was to
`include the following new features:
`Frameset and [Frame elements
`
`a a a @
`
`Form andaccessibility enhancements
`Table enhancements for headers, footers, and columns
`Object element for embedding custom objects
`Script element for embeddingscripts
`File upload capabilities for submitting files to the server
`a Enhancedset of named entities
`
`a @
`
`Framesets and IFrames, table enhancements, and the Object and Script
`elements have all been supported since Internet Explorer 3,0, Internet
`
`11
`
`11
`
`
`
`———— a
`
`PART
`I: HTML AND SCRIPTING
`
`ONE: Overview of HTML and CSS
`——SSeS
`
`Object block. This feature can be used to provide contents for down-level
`browsers that do not support the Object element, as shown here:
`<OBJECT CODE="myClass.class" WIDTH=20@ HEIGHT=200>
`
`<PARAM NAME="color” VALUE=“red">
`<PARAM NAME="background™ YALUE="green">
`<P>Your browser does not support the Object element and
`cannot view the application.</P>
`</OBJECT>
`
`Form and Accessibility Enhancements
`HTMLformswereinitially limited to requesting basic information from the
`user. The interface waslimited to plain-text containers, radio buttons,