HTML III (Forms) Robin Burke ECT 270. Outline Where we are in this class Web applications HTML Forms Break Forms lab.

Slides:



Advertisements
Similar presentations
Web forms and CGI scripts Dr. Andrew C.R. Martin
Advertisements

Tutorial 6 Creating a Web Form
Video, audio, embed, iframe, HTML Form
COS 125 DAY 23. Agenda Assignment 6 Corrected  5 A’s, 1 B, 1 C and 1 D  Problems with using CSS for layouts Assignment 7 is due today Assignment 7 Assignment.
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.
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?
1 Forms A form is the usual way that information is gotten from a browser to a server –HTML has tags to create a collection of objects that implement this.
Chapter 5 Java Script And Forms JavaScript, Third Edition.
Event-driven Programming
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.
Tutorial 7 Creating Forms. Objectives Session 7.1 – Create an HTML form – Insert fields for text – Add labels for form elements – Create radio buttons.
JavaScript, Fourth Edition Chapter 5 Validating Form Data with JavaScript.
Chapter 8 Collecting Data with Forms. Chapter 8 Lessons Introduction 1.Plan and create a form 2.Edit and format a form 3.Work with form objects 4.Test.
Website Development with PHP and MySQL Saving Data.
 Whether using paper forms or forms on the web, forms are used for gathering information. User enter information into designated areas, or fields. Forms.
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.
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.
TJ 3043 – Web Application Development HTML Form. 2.0 Forms A form is the usual way to communicate information from a Web browser to a server HTML has.
Creating Web Page Forms. Introducing Web Forms Web forms collect information from users Web forms include different control elements including: –Input.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 9 Key Concepts 1 Copyright © Terry Felke-Morris.
Web Development & Design Foundations with XHTML Chapter 9 Key Concepts.
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.
Forms Collecting Data CSS Class 5. Forms Create a form Add text box Add labels Add check boxes and radio buttons Build a drop-down list Group drop-down.
Introduction To HTML Form Inputs Written By George Gimian.
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.
©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.
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.
COS 125 DAY 17. Agenda  Assignment 7 not finished grading  Assignment 8 posted Due April 9  Capstone progress reports due  Quiz 2 Corrected 2 A’s,
Creating Forms on a Web Page. 2 Introduction  Forms allow Web developers to collect visitor feedback  Forms create an environment that invites people.
Copyright (c) 2004 Prentice-Hall. All rights reserved. 1 Committed to Shaping the Next Generation of IT Experts. Project 6: Creating XHTML Forms Kelly.
Internet & World Wide Web How to Program, 5/e Copyright © Pearson, Inc All Rights Reserved.
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
Chapter 5 Validating Form Data with JavaScript
How to Write Web Forms By Mimi Opkins.
HTML IV (Forms) Robin Burke ECT 270.
Designing Forms Lesson 10.
Introducing Forms.
Forms, cont’d.
Presentation transcript:

HTML III (Forms) Robin Burke ECT 270

Outline Where we are in this class Web applications HTML Forms Break Forms lab

Introduction to the course Overview of networking, the Internet and the WWW, Unix survival 1 st week HTML 3 weeks Cascading Style Sheets 1.5 weeks JavaScript 4 weeks

Last class on HTML Mastery of this material will be assumed Midterm JavaScript Final Project

Web application Application "A complete, self-contained program that performs a specific function directly for the user" Web application an application delivered over the WWW

Web applications Core of web development 90% of the web's "pages" are generated from user input only 10% are static pages Partly not in our scope ECT 353 teaches how to build those kinds of applications But web applications need input Input comes from HTML forms

Example applications Course online CampusConnect course search Ugly! Any search engine

Architecture

Web client browser Request URL + parameters input from the user Web server dispatches request to application Application processes input produces output either page or data processed by web server to produce page

Input data Either part of URL (GET method) part of request body (POST method) Form data name-value pairs ? syntax for GET Uploaded files "multi-part" content POST only

Building Web Applications Simplest run a program taking user's input CGI, ISAPI, Java servlet Easiest to develop write a web page with special scripting behavior ASP, JSP, PHP, ColdFusion Most flexible separate data from HTML XML, Struts

For this class "Echo" application Displays a page with the input

What all these share... the need to get user input from a web page Form of input name-value pair How to get from user? depends on the data

Form element chunk a part of the page in which input tags can be placed defines the URL where user data will be sent defines processing mechanism

Input elements name and value attributes user can change the value attribute how depends on the type text field selection list radio button, etc

Example

Simple example Simple form example

Input elements Treated like other page elements can be organized into paragraph, tables, etc. Form layout is almost always table- based All use the same base element INPUT what kind of input controlled by the type attribute

Input elements

Text field Example Attributes type attribute determines the kind of input name & id are equivalent but id is not widely implemented value is initial contents of field size is width of field maxlength is the number of chars accepted

Labels No inherent labeling regular HTML text used HTML 4.0 adds label element only available where id attribute is recognized Otherwise use text and layout to identify form elements

Label element Benefits can be scripted can be handled by non-visual browsers Element Label text place where you want the text to appear

Checkboxes Allow a simple interface to a yes/no choice Attributes value will be included in the parameters if the box is checked checked controls whether the box is checked by default Not XHTML compliant checked="true"

Example Enter query: <input name="field_example" id="field_example3" type="text" value=""> Local search only: <input type="checkbox" name="checkbox" value="checkbox" checked>

Radio buttons Allow the user to select one from a (short) list of options Groups Radio buttons come in groups Groups are defined by shared name attributes

Radio Button Attributes name only one field for a group of radio buttons the name attribute does the linking if buttons don't link, check name fields id must be unique for each element identifies a radio button uniquely value what the value the field will have if this button is checked checked which button of a group will be the default

Example Enter query: <input name="field_example" id="field_example3" type="text" value=""> Search type: Local: <input type="radio" name="search_type" id="local" value="local" checked> Full: <input type="radio" name="search_type" id="full" value="full">

Grouping fieldset tag can be used to group logical elements like radio buttons

Example Search type Local <input type="radio" name="search_type" id="local" value="local" checked> Full <input type="radio" name="search_type" id="full" value="full">

Selection lists Radio buttons are not good for long lists of options menus – good for single selection list box – good for larger lists and multiple selection Problem awkward to use the INPUT element different structure needed

Select element Select element specifies a selection list either a menu (size=1), or a list box (size > 1) Contains option elements to specify each choice

Example <select size="1" name="search_type" id="search_type"> Local Full

Attributes Select element size is the number of elements displayed at one time 1 = menu otherwise box of given height multiple means that multiple selections are allowed name is the field name Option element value is the value of the field if this option is chosen selected identifies the default value

Example <select size="4" name="search_type" id="search_type" multiple> Local Special Collections Technical Reports Press Releases Full

Buttons Types submit button sends the request to the server reset button returns all fields to default action (or push) button can execute a scripted action user-formated button separate button element

Reset and submit Must have a submit button reset is optional value attribute controls the text of the button doesn't have to be "Submit"

User-formatted button Example Run the search Embedded HTML displayed in button

More form elements Password input element type = "password" typed text not displayed Hidden input element type = "hidden" contents not displayed not editable by user vulnerable to hacking File input element type = "file" lets the user choose a file to upload (as in COL)

Still more form elements Image input element type = "image" like a submit button, but location information in request Textarea not an input tag multi-line input allowed element contents become default text

Moving through a form: tabs Tabs move from one field to another always in HTML order Can specify tab order in input elements tabindex attribute

Moving through a form: keys We can also jump around in the form Using access keys accesskey attribute

Final example