Chapter 16 Dynamic HTML: Data Binding with Tabular Data Control.

Slides:



Advertisements
Similar presentations
17 HTML, Scripting, and Interactivity Section 17.1 Add an audio file using HTML Create a form using HTML Add text boxes using HTML Add radio buttons and.
Advertisements

E-Commerce CMM503 – Lecture 8 Stuart Watt Room C2.
WEB DESIGN TABLES, PAGE LAYOUT AND FORMS. Page Layout Page Layout is an important part of web design Why do you think your page layout is important?
23-Aug-14 HTML/XHTML Forms. 2 What are forms? is just another kind of XHTML/HTML tag Forms are used to create (rather primitive) GUIs on Web pages Usually.
Working with Tables for Page Design – Lesson 41 Working with Tables for Page Design Lesson 4.
JavaScript Part 6. Calling JavaScript functions on an event JavaScript doesn’t have a main function like other programming languages but we can imitate.
Tutorial 6 Creating a Web Form
Session 12 Dynamic HTML: Filters and Transitions, Data Binding with Tabular Data Control Matakuliah: M0114/Web Based Programming Tahun: 2005 Versi: 5.
1 Chapter 12 Working With Access 2000 on the Internet.
Tutorial 6 Working with Web Forms
 2008 Pearson Education, Inc. All rights reserved. 1 Introduction to HTML.
Introduction to HTML II Shih-Heng Chin. Preface Structure of a HTML File Elements used frequently Tables.
Tutorial 6 Working with Web Forms. XP Objectives Explore how Web forms interact with Web servers Create form elements Create field sets and legends Create.
Outline IS400: Development of Business Applications on the Internet Fall 2004 Instructor: Dr. Boris Jukic Table, Forms, Metatags and Frames.
Copyright © 2004 ProsoftTraining, All Rights Reserved. Lesson 9: Frames © 2007 Prosoft Learning Corporation All rights reserved ITD 110 Web Page Design.
Copyright © 2004 ProsoftTraining, All Rights Reserved. Lesson 9: HTML Frames.
HTML. Creating a Table Attributes: border: indicates the border type of the table Value: 0 (no border), 1, 2, etc. cols: indicates the number of columns.
CST JavaScript Validating Form Data with JavaScript.
Chapter 9 Collecting Data with Forms. A form on a web page consists of form objects such as text boxes or radio buttons into which users type information.
4.1 JavaScript Introduction
XP Tutorial 6New Perspectives on HTML and XHTML, Comprehensive 1 Creating Web Page Forms Designing a Product Registration Form Tutorial 6.
_______________________________________________________________________________________________________________ E-Commerce: Fundamentals and Applications1.
Overview of Previous Lesson(s) Over View  ASP.NET Pages  Modular in nature and divided into the core sections  Page directives  Code Section  Page.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML Pt. 2.
Images (1) Three most popular formats – Graphics Interchange Format (GIF) – Joint Photographic Experts Group (JPEG) – Portable Network Graphics (PNG) –
 2000 Deitel & Associates, Inc. All rights reserved. Chapter 20 – Dynamic HTML: Path, Sequencer and Sprite ActiveX Controls Outline 20.1Introduction 20.2DirectAnimation.
Tutorial 7 Creating Forms. Objectives Session 7.1 – Create an HTML form – Insert fields for text – Add labels for form elements – Create radio buttons.
Using Client-Side Scripts to Enhance Web Applications 1.
Introduction to JavaScript 41 Introduction to Programming the WWW I CMSC Winter 2004 Lecture 17.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
LOGO FORMs in HTML CHAPTER 5 Eastern Mediterranean University School of Computing and Technology Department of Information Technology ITEC229 Client-Side.
ITCS373: Internet Technology Lecture 5: More HTML.
DHTML1-1 Dynamic HTML: Filters & Data Binding with Table Xingquan (Hill) Zhu
USING XML AS A DATA SOURCE. Data binding is a process by which information in a data source is stored as an object in computer memory. In this presentation,
 2004 Prentice Hall, Inc. All rights reserved. Chapter 16 - Dynamic HTML: Data Binding with Tabular Data Control Outline 16.1 Introduction 16.2 Simple.
4 Chapter Four Introduction to HTML. 4 Chapter Objectives Learn basic HTML commands Discover how to display graphic image objects in Web pages Create.
XP 1 New Perspectives on XML Binding XML Data with Internet Explorer.
Ali Alshowaish. What is HTML? HTML stands for Hyper Text Markup Language Specifically created to make World Wide Web pages Web authoring software language.
New Perspectives on XML, 2nd Edition Tutorial 9B1 USING XML AS A DATA SOURCE TUTORIAL 9B.
Tutorial 6 Working with Web Forms. XP Objectives Explore how Web forms interact with Web servers Create form elements Create field sets and legends Create.
Tutorial 6 Working with Web Forms. 2New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition Objectives Explore how Web forms interact with.
Data Binding with Tabular Data Control. Objective To understand Dynamic HTML data binding. To be able to sort and filter data directly on the client without.
1 Review of HTML Elements. 2 The tag These tags are marked as comments in HTML. Any text between these two comment tags will.
TRAINING SESSIONS.NET Controls.  Standard Controls  Label  Textbox  Checkbox  Button, Image Button, Image control  Radio Button  Literal  Hyperlink.
Chapter 16 DHTML: Data Binding CIS 275—Web Application Development for Business I.
HTML IMAGES. CONTENTS IMG Tag Alt Attribute Setting Width and Height Of An Image Summary Exercise.
©SoftMooreSlide 1 Introduction to HTML: Forms ©SoftMooreSlide 2 Forms Forms provide a simple mechanism for collecting user data and submitting it to.
Introduction to HTML. _______________________________________________________________________________________________________________ 2 Outline Key issues.
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
Tutorial 6 Working with Web Forms. 2New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition Objectives Explore how Web forms interact with.
HTML Links HTML uses a hyperlink to another document on the Web.
20-753: Fundamentals of Web Programming 1 Lecture 6: Advanced HTML Fundamentals of Web Programming Lecture 6: Advanced HTML.
 2004 Prentice Hall, Inc. All rights reserved. Dynamic HTML: Data Binding with Tabular Data Control.
Internet & World Wide Web How to Program, 5/e Copyright © Pearson, Inc All Rights Reserved.
 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 16 - Dynamic HTML: Data Binding with Tabular Data Control Outline 16.1 Introduction 16.2 Simple.
CSC 121 Computers and Scientific Thinking Fall Event-Driven Programming.
Site Development Foundations © 2004 ProsoftTraining All rights reserved.
Tutorial 6 Creating a Web Form
Embedding XML in HTML: Using Data Islands Eugenia Fernandez IUPUI.
HTML Structure II (Form) WEEK 2.2. Contents Table Form.
Glencoe Introduction to Web Design Chapter 4 XHTML Basics 1 Review Do you remember the vocabulary terms from this chapter? Use the following slides to.
 2001 Prentice Hall, Inc. All rights reserved. 1 Chapter 18 - Dynamic HTML: Path Sequencer and Sprite ActiveX Controls Outline 18.1 Introduction 18.2.
Chapter 16 - Dynamic HTML: Data Binding with Tabular Data Control
Basic XHTML Tables XHTML tables—a frequently used feature that organizes data into rows and columns. Tables are defined with the table element. Table.
Chapter 5 Introduction to XHTML: Part 2
Basic HTML and Embed Codes
Pertemuan 1b
Introduction to HTML.
Introduction to HTML: Forms
Lesson 5: HTML Tables.
Presentation transcript:

Chapter 16 Dynamic HTML: Data Binding with Tabular Data Control

Outline Introduction Tabular Data Control (TDC) Tabular Data Control (TDC) Simple Data Binding Binding to an img Binding to a table Sorting table Data Data Binding Elements

Introduction Data binding Data binding –Data no longer reside exclusively on the server –Data can be maintained on the client –Eliminate server activity and network delays To bind data to XHTML elements, IE uses Data Source Objects (DSOs) To bind data to XHTML elements, IE uses Data Source Objects (DSOs) –Most popular DSO: Tabular Data Control (TDC) –TDC extracts ordered (delimited) contents from an ASCII (text) file into web pages –TDC is an ActiveX control built into IE

ActiveX Controls ActiveX Controls allow a client to increase the capabilities of their browser ActiveX Controls allow a client to increase the capabilities of their browser –a Microsoft technology, similar to plug-ins –unlike plug-ins, ActiveX controls are readily and immediately available when visit a page that uses a control Most controls download and install very quickly Most controls download and install very quickly Need to download a control only once. After that, the control is always available for use on your system Need to download a control only once. After that, the control is always available for use on your system

ActiveX Controls To embed an ActiveX control in a Web page, use the element To embed an ActiveX control in a Web page, use the element This element tells your browser to insert an object of a specified type into a page This element tells your browser to insert an object of a specified type into a page You can add many types of objects to your pages with the element You can add many types of objects to your pages with the element e.g. e.g. object parameters or alternate HTML for browsers that don't support objects </object>

object Attributes To identify a specific object type, you must define attributes for your objects To identify a specific object type, you must define attributes for your objects The useful tag attributes for ActiveX objects: The useful tag attributes for ActiveX objects: –id: An identifier for the specific instance of the object –classid: Identifies the object's class –data: URL for the object's data –height: Sets the object's height –width: Sets the object's width –……

Tabular Data Control (TDC) The Tabular Data Control The Tabular Data Control –is very useful if we have relatively small amounts of data and need to update this data frequently and require client-side scripting. –can act like a small database –available in IE 4.0+ Globally Unique Identifier for the tabular data control is CLSID:333C7BC4-460F-11D0-BC C7055A83 Globally Unique Identifier for the tabular data control is CLSID:333C7BC4-460F-11D0-BC C7055A83 <object id = "colors" classid = "CLSID:333C7BC4-460F-11D0-BC C7055A83"> object parameters object parameters

Tabular Data Control (TDC) Parameters of the object are specified using the tag. The tabular data control has around 7 parameters Parameters of the object are specified using the tag. The tabular data control has around 7 parameters Some important parameters: Some important parameters: DataURL : The path of the file that contains the data UseHeader : When set to true, it indicates that we want to use the field names for referencing a particular field. The default value is false TextQualifier : The character at the beginning and end of a text that qualifies that text. FieldDelim : The Field Delimiter is used to distinguish between the different data fields of the data file.

HTMLStandardColors.txt

Example Insert a Tabular Data Control Insert a Tabular Data Control <object id = "Colors" classid = "CLSID:333C7BC4-460F-11D0-BC C7055A83">

Simple Data Binding recordset : creates a reference point to the data file recordset : creates a reference point to the data file Properties: Properties: –EOF: used to check if we have reached the end of the file –absolutePosition: position within the recordset Methods: Methods: –moveFirst() : Point to the first data item (first row) –moveNext() : Point to the next data item from previous position –moveLast() : Point to the last data item (last row) ondatasetcomplete : Event handler that fires when the control and its data has loaded. ondatasetcomplete : Event handler that fires when the control and its data has loaded.

Simple Data Binding Example: Example: –To reference a TDC's data file, and display its 2nd row var dataSet=Colors.recordset; var dataSet=Colors.recordset; dataSet.moveNext(); dataSet.moveNext(); –To bind an element to a data file <span datasrc = "#Colors" <span datasrc = "#Colors" datafld = "ColorName"> datafld = "ColorName">

introdatabind.html (1 of 4)

introdatabind.html (2 of 4)

introdatabind.html (3 of 4)

Binding to an img Many different types of XHTML elements can be bound to data sources Many different types of XHTML elements can be bound to data sources –Binding to an img element Changing the recordset updates the src attribute of the image Changing the recordset updates the src attribute of the image

images.txt

binding.html (1 of 3)

binding.html (2 of 3)

binding.html (3 of 3)

Binding to a table Binding data to a table is perhaps the most important of data binding Binding data to a table is perhaps the most important of data binding –Different from the data binding weve seen

tablebind.html (1 of 2)

tablebind.html (2 of 2)

Sorting table Data Sorting data dynamically is governed by the following property and method: Sorting data dynamically is governed by the following property and method: –Sort: property that contain the sort string (+- column_name) and control how the data will be sorted column_name: data will be sorted by this column in asecending order column_name: data will be sorted by this column in asecending order -column_name: data will be sorted by this column in descending order -column_name: data will be sorted by this column in descending order –reset(): Method that refreshes the displayed data according to the settings of a Sort request.

Sorting Exmples Colors.Sort = ColorName Colors.Sort = ColorName Colors.Reset() Colors.Reset() Colors.Sort = - ColorName Colors.Reset() Colors.Reset()

Data Binding Elements The elements to which a data source is bound determine how the data will be displayed The elements to which a data source is bound determine how the data will be displayed –Different elements may use the data for different purposes. Element Bindable Property Element Bindable Property a href a href div, span contained text div, span contained text img src img src table cell elements table cell elements