Copyright (c) 2004 Prentice-Hall. All rights reserved. 1 Committed to Shaping the Next Generation of IT Experts. Project 6: Creating XHTML Forms Kelly.

Slides:



Advertisements
Similar presentations
Tutorial 6 Creating a Web Form
Advertisements

XP 1 Creating Web Page Forms Designing a Product Registration Form Tutorial 6.
Creating Web Page Forms. Objectives Describe how Web forms can interact with a server-based program Insert a form into a Web page Create and format a.
Tutorial 6 Working with Web Forms
Forms Review. 2 Using Forms tag  Contains the form elements on a web page  Container tag tag  Configures a variety of form elements including text.
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.
Creating Web Page Forms
Tutorial 6 Forms Section A - Working with Forms in JavaScript.
Web Development & Design Foundations with XHTML Chapter 9 Key Concepts.
Chapter 10 Form Basics Key Concepts Copyright © 2013 Terry Ann Morris, Ed.D 1.
CST JavaScript Validating Form Data with JavaScript.
1 Web Developer & Design Foundations with XHTML Chapter 6 Key Concepts.
XP Tutorial 6New Perspectives on Creating Web Pages with HTML, XHTML, and XML 1 Creating Web Page Forms Designing a Product Registration Form Tutorial.
XP Tutorial 6New Perspectives on HTML and XHTML, Comprehensive 1 Creating Web Page Forms Designing a Product Registration Form Tutorial 6.
CO1552 Web Application Development HTML Forms. Websites can be made more interactive by providing facilities for users to provide data To get user entered.
1 Creating Web Forms in HTML Web forms collect information from customers Web forms include different control elements including: –Input boxes –Selection.
Forms and Form Controls Chapter What is a Form?
CSE 382/ETE 334 Internet and Web Technology Presented By Dr. Shazzad Hosain Asst. Prof. EECS, NSU.
Chapter 5 Java Script And Forms JavaScript, Third Edition.
Chapter 6: Forms JavaScript - Introductory. Previewing the Product Registration Form.
XHTML Introductory1 Forms Chapter 7. XHTML Introductory2 Objectives In this chapter, you will: Study elements Learn about input fields Use the element.
Robinson_CIS_285_2005 HTML FORMS CIS 285 Winter_2005 Instructor: Mary Robinson.
CSC 2720 Building Web Applications HTML Forms. Introduction  HTML forms are used to collect user input.  The collected input is typically sent to a.
Copyright © 2004 ProsoftTraining, All Rights Reserved. Lesson 7: Web Forms.
Copyright © 2004 ProsoftTraining, All Rights Reserved. Lesson 7: Web Forms © 2007 Prosoft Learning Corporation All rights reserved ITD 110 Web Page Design.
JavaScript, Fourth Edition Chapter 5 Validating Form Data with JavaScript.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
HTML Forms.
LOGO FORMs in HTML CHAPTER 5 Eastern Mediterranean University School of Computing and Technology Department of Information Technology ITEC229 Client-Side.
Web Development & Design Foundations with XHTML Chapter 9 Key Concepts.
1 © Netskills Quality Internet Training, University of Newcastle HTML Forms © Netskills, Quality Internet Training, University of Newcastle Netskills is.
Dreamweaver MX. 2 Overview of Templates n Forms enable you to collect data from ______. n A form contains ________ such as text fields, radio buttons,
Week 9 - Form Basics Key Concepts 1. 1.Describe common uses of forms on web pages 2.Create forms on web pages using the form, input, textarea, and select.
ITCS373: Internet Technology Lecture 5: More HTML.
XHTML & Forms. PHP and the WWW PHP and HTML forms – Forms are the main way users can interact with your PHP scrip Typical usage of the form tag in HTML.
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.
Site Development Foundations © 2004 ProsoftTraining All rights reserved.
Creating Web Page Forms. Introducing Web Forms Web forms collect information from users Web forms include different control elements including: –Input.
1 HTML Forms
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 9 Key Concepts 1 Copyright © Terry Felke-Morris.
HTML Forms a form is a container for input elements on a web page input elements contain data that is sent to the web server for processing.
SYST Web Technologies SYST Web Technologies XHTML Forms.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 9 Key Concepts 1 Copyright © Terry Felke-Morris.
+ FORMS HTML forms are used to pass data to a server. begins and ends a form Forms are made up of input elements Every input element has a name and value.
Copyright © Texas Education Agency, All rights reserved.1 Web Technologies Website Forms / Data Acquisition.
Starting BBEdit or Notepad and Opening the HTML File Start BBEdit or Notepad Select Open from the File Menu Open survey1.htm from the Public Folder.
©SoftMooreSlide 1 Introduction to HTML: Forms ©SoftMooreSlide 2 Forms Forms provide a simple mechanism for collecting user data and submitting it to.
Tutorial 6 Working with Web Forms. 2New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition Objectives Explore how Web forms interact with.
Creating Web Page Forms COE 201- Computer Proficiency.
HTML Creating Forms on a Web Page. 2 Objectives  Discuss the process of creating a form  Distinguish between data input controls and text input controls.
HTML Forms.
HTML Forms. A form is simply an area that can contain form fields. Form fields are objects that allow the visitor to enter information - for example text.
Creating Forms on a Web Page. 2 Introduction  Forms allow Web developers to collect visitor feedback  Forms create an environment that invites people.
1 HTML forms (cont.)
Internet & World Wide Web How to Program, 5/e Copyright © Pearson, Inc All Rights Reserved.
Tutorial 6 Creating a Web Form
HTML III (Forms) Robin Burke ECT 270. Outline Where we are in this class Web applications HTML Forms Break Forms lab.
Lesson 5 Introduction to HTML Forms. Lesson 5 Forms A form is an area that can contain form elements. Form elements are elements that allow the user to.
HTML Structure II (Form) WEEK 2.2. Contents Table Form.
Ashima Wadhwa Java Script And Forms. Introduction Forms: –One of the most common Web page elements used with JavaScript –Typical forms you may encounter.
XP Tutorial 6New Perspectives on HTML, XHTML, and DHTML, Comprehensive 1 Creating Web Page Forms Designing a Product Registration Form Tutorial 6.
2440: 141 Web Site Administration Web Forms Instructor: Joseph Nattey.
Tutorial 6 Working with Web Forms
ITE 115 Creating Web Page Forms
Basic XHTML Tables XHTML tables—a frequently used feature that organizes data into rows and columns. Tables are defined with the table element. Table.
Introducing Forms.
CNIT 131 HTML5 - Forms.
Lesson 6: Web Forms.
Presentation transcript:

Copyright (c) 2004 Prentice-Hall. All rights reserved. 1 Committed to Shaping the Next Generation of IT Experts. Project 6: Creating XHTML Forms Kelly L. Valqui Essentials for Design XHTML

Copyright (c) 2004 Prentice-Hall. All rights reserved. 2 Why Use Forms?  Purpose of a form – acquire information from the user and send it to the server  Many advantages:  Monitor users’ behavior on your sites  Interactions with users  E-commerce  Enable Internet searches

Copyright (c) 2004 Prentice-Hall. All rights reserved. 3 Visual Summary A typical form Single-line text fields Multi-line text area Submit input

Copyright (c) 2004 Prentice-Hall. All rights reserved. 4 Using the Tag   Tells browser where a form begins and ends  Attributes can indicate  Name of form  Destination of form data  How data is sent

Copyright (c) 2004 Prentice-Hall. All rights reserved. 5 Using the Tag   Specifies an input field of the form  Attributes can indicate  Name of input field  Type of input field (e.g. text, submit button, etc.)  Other items such as size, color, formats

Copyright (c) 2004 Prentice-Hall. All rights reserved. 6 Code for Form Page Form Test Page Start of form End of form Text type input field

Copyright (c) 2004 Prentice-Hall. All rights reserved. 7 Effects of and (initial page) The text-type input field. User has typed text into the field

Copyright (c) 2004 Prentice-Hall. All rights reserved. 8 Effects of and (after user types text and hits Enter) Note that data entered by user was sent to the Web server, added to the URL address

Copyright (c) 2004 Prentice-Hall. All rights reserved. 9 Submitting Form Data  Form data – the information a user types into a form  Submitting – pressing the Enter key, or clicking a Submit button  Form Data is submitted as part of the URL address location  Data is submitted in name-value pairs  Name – the name of the input field's tag  Value – the value the user typed into the input field

Copyright (c) 2004 Prentice-Hall. All rights reserved. 10 The Tag's action Attribute  Form action – the receiving page of the data sent by the browser  Action attribute – specifies the relative or absolute URL of the receiving page  Action attribute will usually pertain to a server-side script file (CGI, ASP, PHP)

Copyright (c) 2004 Prentice-Hall. All rights reserved. 11 Effect of Using the action Attribute Action attribute caused a different page to be called Data was sent to this page as a name-value pair Name = username Value = test user name (spaces represented with +)

Copyright (c) 2004 Prentice-Hall. All rights reserved. 12 Working with Text Input Fields  Text input field – a single-line option that allows users to enter alphanumeric text  Attributes controlling text input fields  type – if you indicate "text", this makes it a single- line text field  value – sets initial value displayed in the text field  size – specifies number of visible characters  maxlength – specifies the maximum number of characters that can be input into the field  Example syntax:

Copyright (c) 2004 Prentice-Hall. All rights reserved. 13 Effect of Input Tag Attributes Type = "text" Single line text field Size = "20" 20 visible characters Maxlength = "20" max 20 characters can be entered Value = "Enter Your Userid" initial value seen in text field

Copyright (c) 2004 Prentice-Hall. All rights reserved. 14 Using Password Fields  Setting the tag's type attribute  type = "password"  Effect –  data typed by the user cannot be observed on the screen  characters displayed as black dots  Limitations  this does not encrypt the data as it is sent over the Internet

Copyright (c) 2004 Prentice-Hall. All rights reserved. 15 Using Submit Buttons  Setting the tag's type attribute  type = "submit"  Effect –  Clicking the button sends data to the Web server  Particularly useful for forms with multiple input tags

Copyright (c) 2004 Prentice-Hall. All rights reserved. 16 Effect of Input Password and Submit

Copyright (c) 2004 Prentice-Hall. All rights reserved. 17 Radio Buttons  Radio button – input field with a round button for item selection  Radio group – a group of radio buttons  Only one radio button in a radio group can be selected  Attributes for radio button input tags  type = "radio"  name – specifies the radio group  checked – indicates that a button is selected

Copyright (c) 2004 Prentice-Hall. All rights reserved. 18 Radio Buttons Syntax  <input type="radio" name="name" value="val" checked="checked"> Text to Display Indicates radio type Value that will be submitted for the group if checked Selected item. Only one in a group Label displayed to the user for the radio button Name of the group

Copyright (c) 2004 Prentice-Hall. All rights reserved. 19 Effect of Radio Buttons Yes No Maybe

Copyright (c) 2004 Prentice-Hall. All rights reserved. 20 Checkboxes  Indicate something to which the user must agree  Similar to Radio Buttons  Difference from Radio Buttons – user can select more than one choice  Attributes  type="checkbox"  name – specifies the checkbox group  checked – indicates that a checkbox is selected

Copyright (c) 2004 Prentice-Hall. All rights reserved. 21 Effect of CheckBoxes Yes No Maybe

Copyright (c) 2004 Prentice-Hall. All rights reserved. 22 Creating an Order Form Check boxes, more than one can be checked at a time Radio buttons, only one in the group can be checked at a time

Copyright (c) 2004 Prentice-Hall. All rights reserved. 23 Working with Order Forms  A typical type of Web form is an Order Form  Order form – a form that allows users to buy items from a Web site, usually on a secure server  Secure server – a Web server that ensures encryption of data to prevent hacking  Order forms make use of many input types, including checkboxes and radio buttons

Copyright (c) 2004 Prentice-Hall. All rights reserved. 24 Tabbing Through a Form  Goal – control which input tag gets the focus when user presses the Tab key  Solution – use the tag's tabindex attribute  tabindex is assigned a number, which determines the tab order of the input tag  Example syntax: 

Copyright (c) 2004 Prentice-Hall. All rights reserved. 25 Select Boxes  Concepts  Pull-down menus, drop-down boxes, drag-down menus, or drop lists  Select and option elements  Single vs. multiple selections  Hands-on Exercise  Add a Select Box  Add a Multiple-Choice Select List

Copyright (c) 2004 Prentice-Hall. All rights reserved. 26 Select Boxes  Also known as pull-down menus, drop-down boxes, drag-down menus, or drop lists  Hybrids of radio buttons and checkboxes  Two tags:  – indicates the complete list of options to choose from  – indicates one of the choices (nested within )

Copyright (c) 2004 Prentice-Hall. All rights reserved. 27 Attributes of the and Tags  attributes  name – name of the element from which a value is chosen  size – how many options are visible at a time  multiple – whether more than one option can be chosen at a time  attributes  value – value of the option  selected – whether the option is chosen

Copyright (c) 2004 Prentice-Hall. All rights reserved. 28 Single-Selection Dropdown List Yes No Maybe

Copyright (c) 2004 Prentice-Hall. All rights reserved. 29 Multiple-Selection List Yes No Maybe

Copyright (c) 2004 Prentice-Hall. All rights reserved. 30 Working with the Tag  – a multiline text box  attributes  cols – indicates number of visible characters in a line  rows – indicates the number of lines of the text area that will be visible

Copyright (c) 2004 Prentice-Hall. All rights reserved. 31 Effect of The initial text for a textarea goes into the textarea element.

Copyright (c) 2004 Prentice-Hall. All rights reserved. 32 Purpose of Hidden Fields  Send information to Web server without displaying to user  Example uses:  Session number that identifies user  Information of pages user has visited  Information on page the user visited before coming to the form.  Additional information about product required for packaging.

Copyright (c) 2004 Prentice-Hall. All rights reserved. 33 Creating Hidden Fields  Example syntax:   Submitting form:  Hidden field is submitted with the page  Hidden field is in plain view in the URL  Not encrypted or secure

Copyright (c) 2004 Prentice-Hall. All rights reserved. 34 Submit and Reset Buttons  Submit buttons  Send form data to the Web server  Syntax:  Reset buttons  Clear the data in input fields of a form  Syntax:  Attributes  name – identifier of the button  value – text that appears in the label of the button

Copyright (c) 2004 Prentice-Hall. All rights reserved. 35 Button Tags

Copyright (c) 2004 Prentice-Hall. All rights reserved. 36 Form Script Options  Form submissions go to Web server scripts to be processed  Server script is identified in the form tag's action attribute  Common types of server-side scripts  Common Gateway Interface (CGI)  ColdFusion  Active Server Pages (ASP)