HTML Forms. collect information for passing to server- side processes built up from standard widgets –text-input, radio buttons, check boxes, option lists,

Slides:



Advertisements
Similar presentations
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?
Advertisements

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.
24-Aug-14 HTML Forms. 2 What are forms? is just another kind of HTML tag HTML forms are used to create (rather primitive) GUIs on Web pages Usually the.
Tutorial 6 Creating a Web Form
JavaScript Forms Form Validation Cookies. What JavaScript can do  Control document appearance and content  Control the browser  Interact with user.
Chapter 6 Basic forms 1. Forms and query string 2 form : a group of user input (UI) controls that accepts information from the user and sends the information.
Supplement Creating Forms. Objectives Show how forms are used How to create the Form element HTML elements used for creating input fields.
HTML and XHTML Controlling the Display Of Web Content.
JavaScript Forms Form Validation Cookies CGI Programs.
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
Form Basics CS Web Data  Most interesting web pages revolve around data  examples: Google, IMDB, Digg, Facebook, YouTube, Rotten Tomatoes  can.
USER INTERACTIONS: FORMS
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.
Using Entities & Creating Forms Jill R. Sommer Institute for Applied Linguistics Kent State University.
Outline IS400: Development of Business Applications on the Internet Fall 2004 Instructor: Dr. Boris Jukic Table, Forms, Metatags and Frames.
Session 2 Tables and forms in HTML Adapted by Sophie Peter from original document by Charlie Foulkes.
Creating Web Page Forms
Tutorial 6 Forms Section A - Working with Forms in 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.
1 Web Developer & Design Foundations with XHTML Chapter 6 Key Concepts.
Reading Data in Web Pages tMyn1 Reading Data in Web Pages A very common application of PHP is to have an HTML form gather information from a website's.
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?
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 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.
HTML - Forms By Joaquin Vila, Ph.D.. Form Tag The FORM tag specifies a fill-out form within an HTML document. More than one fill-out form can be in a.
Robinson_CIS_285_2005 HTML FORMS CIS 285 Winter_2005 Instructor: Mary Robinson.
Hypertext Markup Language HTML Hypertext is vaguely defined as interconnecting pieces of information in a non-sequential but usually relational, manner.
CSC 2720 Building Web Applications HTML Forms. Introduction  HTML forms are used to collect user input.  The collected input is typically sent to a.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
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.
HTML Forms.
LOGO FORMs in HTML CHAPTER 5 Eastern Mediterranean University School of Computing and Technology Department of Information Technology ITEC229 Client-Side.
1 © Netskills Quality Internet Training, University of Newcastle HTML Forms © Netskills, Quality Internet Training, University of Newcastle Netskills is.
HTML - Forms By Joaquin Vila, Ph.D.. Form Tag The FORM tag specifies a fill-out form within an HTML document. More than one fill-out form can be in a.
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.
1 Review of Form Elements. 2 The tag Used in between tags.  Form elements(text control, buttons, etc.. ) goes here. OR  Form elements(text control,
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.
TJ 3043 – Web Application Development HTML Form. 2.0 Forms - A form is the usual way information is gotten from a browser to a server - HTML has tags.
Lecture 6 More Advanced HTML Boriana Koleva Room: C54
Web Technologies Lecture 3 Web forms. HTML5 forms A component of a webpage that has form controls – Text fields – Buttons – Checkboxes – Range controls.
+ 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.
Project 6 Creating Forms on a Web Page. Objectives Define terms related to forms Describe the different form controls and their uses Use the tag Create.
HTML Forms.
1 HTML forms (cont.)
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.
Unit 4 Working with data. Form Element HTML forms are used to pass data to a server. A form can contain input elements like text fields, checkboxes, radio-buttons,
FORMS Explained By: Jasdeep Kaur. Lecturer, Department of Computer Application, PGG.C.G., Sector: 42, Chandigarh.
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.
How to Write Web Forms By Mimi Opkins.
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.
Forms, cont’d.
CNIT 131 HTML5 - Forms.
Presentation transcript:

HTML Forms

collect information for passing to server- side processes built up from standard widgets –text-input, radio buttons, check boxes, option lists, buttons, images usually mixed in with other HTML –especially tables may also contain JavaScript –for input validation and user instruction

The tag used to contain the elements of a form various form elements go in here usually laid out with text labels, images and other information

attributes of ACTION –URL pointing to a server-side process –all data from the form is sent as a list of name+value pairs –the data is used by the server-side process, which usually sends back a response page

attributes of METHOD this attribute specifies which http method the browser will use to connect to the server –GET to retrieve data from the server form data appears as request parameters in the browser message window –POST - to send data to the server should be used for data to be held on the server

attributes of ENCTYPE attribute specifies how the form data is encoded data is encoded before being sent to server –avoids data corruption –not the same as encryption data will be decoded by the web server or receiving process

ENCTYPE the default value of ENCTYPE is: application/x-www-form-urlencoded converts to + nonalphanumeric characters as % followed by ASCII code (as 2 hexadecimal digits) line break is %OD%OA (carriage return, line-feed) this is the most commonly used encoding this is non-encrypted because it is trivial to decode by reversing the above procedures

ENCTYPE ENCTYPE can also take the value: multipart/form-data encapsulates the form fields as a single, MIME-compatible compound document used in particular with the POST method still unencrypted; the data can be read by anyone intercepting the request

form widgets

the tag used to define a number of different widgets each widget is specified by TYPE attribute a NAME attribute is associated with widget data on submission of the form. NAME is also used to manipulate the widget using JavaScript.

Example <FORM METHOD = POST #sending data to the server# ACTION = sendRhyme.php #to server process# >

Example rhyme = roses

Text Field Attributes SIZE –width, in characters, of display box MAXLENGTH –total number of characters accepted as input may be > SIZE default is unlimited VALUE –default text to appear in field –does not need to be specified

more widgets defined by

Password Fields TYPE = PASSWORD accepts any text displays *****s instead attributes as for TEXT NB: transmitted unencrypted!

File-selection Fields TYPE = FILE Browse button appears, send file on client to server other attributes as for TEXT

Checkboxes TYPE = CHECKBOX for yes/no type non-exclusive selections by user VALUE specifies string sent to server CHECKED controls default display can be grouped –all given same NAME –values sent as comma-separated string to server

Checkboxes (Captions and cell-borders added using other HTML)

Radio Buttons TYPE = RADIO typically grouped by NAME represent mutually exclusive choices only one box in group can be checked –specified using the CHECKED attribute –first element is checked if no other is specified VALUE should be set for each button other attributes as for CHECKBOX

Radio Buttons (Captions and cell-borders added using other HTML)

Submission Buttons TYPE = SUBMIT triggers submission of form data VALUE controls caption on button NAME sent to server

Reset Buttons TYPE = RESET form data reset to default values VALUE controls caption on button

Custom Buttons TYPE = IMAGE SRC = image URL acts as a submit button when clicked also submits mouse x-y coords to server ALIGN - as per

Hidden Fields TYPE = HIDDEN embeds additional information in the page cannot be seen by user cannot be ignored by browser –NAME and VALUE submitted to server used to record state between HTTP transactions and to label forms

more form widgets

the tag this appears as a multi-line text area the user may type, cut and paste text the COLS and ROWS attributes are used to control the dimensions of the textarea a NAME attribute must be specified default text can be inserted as the content of the tag

the tag WRAP = OFF –text is rendered and transmitted as typed WRAP = VIRTUAL –text is wrapped in the browser display but transmitted as typed WRAP = PHYSICAL –text is wrapped in the browser display and transmitted as rendered

the tag this allows selection from a range of choices an tag is used to specify each choice –plain text included as tag content the tag is displayed as a pull-down menu of choices using SELECT reduces onscreen clutter compared to checkboxes or radio buttons if the number of choices is large

the tag NAME attribute –sent to server with selected value MULTIPLE attribute –allows selection of many options –values sent as a comma-separated list SIZE attribute –controls the number of options visible at one time

VALUE attribute –this specifies the data to be sent to the server process along with NAME of the tag SELECTED attribute –this is a keyword attribute –when specified it pre-selects an option –by default, no options are pre-selected

Using forms forms alone are rather primitive use DHTML to control presentation and interaction –, for layout –CSS positioning and layers for layout and navigation –JavaScript for navigation and validation other methods available for web page GUIs –Java applets, Active X –large implementation overheads

Example Web Banking Web Banking Welcome to our web banking page. no, you can't make deposits or get cash.... but you can get balances, make transfers and list the recent transactions on your account. Account Number: PIN: Transaction: Account Balances Transfers Show recent transactions Stop payment on a check

Mail me a written verification Do not mail me a written verification Mail me some information on: Certificates of Deposit Home mortgage interest rates Auto loan interest rates Tell us what you think about our Web Services!