1 © Netskills Quality Internet Training, University of Newcastle HTML Forms © Netskills, Quality Internet Training, University of Newcastle Netskills is.

Slides:



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

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.
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.
CIS101 Introduction to Computing Week 08. Agenda Your questions JavaScript text Resume project HTML Project Six This week online Next class.
Supplement Creating Forms. Objectives Show how forms are used How to create the Form element HTML elements used for creating input fields.
COS 125 DAY 25. Agenda Assignment #7 Graded  2 A’s, 3 B’s, 2 C’s, 1 D, 2 F’s (late) and 5 non-submit Assignment # 8 Due Today Assignment #9 is posted.
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.
COS 125 DAY 26. Agenda Assignment #7 Graded  10 A’s, 4 B’s, and 1 non-submit Assignment # 8 Due April 27 Assignment #9 will be assigned in WebCT by Tuesday.
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.
CGI Programming: Part 1. What is CGI? CGI = Common Gateway Interface Provides a standardized way for web browsers to: –Call programs on a server. –Pass.
Tutorial 6 Forms Section A - Working with Forms in JavaScript.
ECA 228 Internet/Intranet Design I Forms. ECA 228 Internet/Intranet Design I Forms forms are a way for a user to communicate with you – text fields –
HTML F ORMS. F ORMS HTML forms are used to pass data to a server. An HTML form can contain input elements like text fields, checkboxes, radio-buttons,
Web Development & Design Foundations with XHTML Chapter 9 Key Concepts.
Form Handling, Validation and Functions. Form Handling Forms are a graphical user interfaces (GUIs) that enables the interaction between users and servers.
CST JavaScript Validating Form Data with JavaScript.
1 Web Developer & Design Foundations with XHTML Chapter 6 Key Concepts.
1 CS 3870/CS 5870 Static and Dynamic Web Pages ASP.NET and IIS.
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.
Web111a_chapt06.ppt HTML: Section 6 Forms HTML tags: define data input and/or output Define the Input and/or Output on the web page Do not process the.
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.
1 CS 3870/CS 5870 Static and Dynamic Web Pages ASP.NET and IIS.
Chapter 5 Java Script And Forms JavaScript, Third Edition.
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.
Introduction to Programming the WWW I CMSC Summer 2004 Lecture 6.
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.
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.
HTML Forms.
1 HTML Forms
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.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 9 Key Concepts 1 Copyright © Terry Felke-Morris.
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.
HTLM Forms CS3505. Form Handling in Browser html User Files out form WEbBROWSErWEbBROWSEr User read response submit Get URL?input html Get file html script.
Introduction To HTML Form Inputs Written By George Gimian.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 9 Key Concepts 1 Copyright © Terry Felke-Morris.
HTML Forms Chapter 9 pp Basic Form Join our list Name:
 Previous lessons have focused on client-side scripts  Programs embedded in the page’s HTML code  Can also execute scripts on the server  Server-side.
1 HTML forms (cont.)
©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.
Week 10: HTML Forms HNDIT11062 – Web Development.
Basic Webpage Design HTML Forms. Objectives Learn how to use HTML to create a form. Explain the concept of forms Know the difference of GET and POST Discuss.
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.
COSC 2328 – Web Programming.  PHP is a server scripting language  It’s widely-used and free  It’s an alternative to Microsoft’s ASP and Ruby  PHP.
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.
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.
2440: 141 Web Site Administration Web Forms Instructor: Joseph Nattey.
How to Write Web Forms By Mimi Opkins.
Designing Forms Lesson 10.
Forms, cont’d.
Presentation transcript:

1 © Netskills Quality Internet Training, University of Newcastle HTML Forms © Netskills, Quality Internet Training, University of Newcastle Netskills is a trademark of Netskills, University of Newcastle. Partly funded by the

2 © Netskills Quality Internet Training, University of Newcastle Topics A simple HTML document HTML Forms Form tags Input elements Form actions Form methods GET and POST Processing Scripts

3 © Netskills Quality Internet Training, University of Newcastle A plain-text document Mark-up tags interpreted by a web browser A Simple Document Introduction to HTML A one-day workshop run by: Netskills A Simple HTML Document

4 © Netskills Quality Internet Training, University of Newcastle What are HTML Forms? Standard HTML tags which: Collect user input Specify where to send the input Specify how to send the input to be processed HTML tags simply provide an interface to allow user interaction Input is handled by a separate script or program: On the server e.g. via PHP, ASP, CGI etc. In the browser e.g. JavaScript

5 © Netskills Quality Internet Training, University of Newcastle Basic Structure A Simple Form Enter your name: tags enclose the whole form Named text input element

6 © Netskills Quality Internet Training, University of Newcastle More Input Types Radio buttons Choose ONE of the following: A B C Check boxes Choose ANY, ALL or NONE of the following: A B C Same name attribute groups radio buttons Pre-selected option Different name attributes create independent checkboxes

7 © Netskills Quality Internet Training, University of Newcastle Even More Input Types Drop-down menus Choose ONE of the following: No thanks Choose A Choose B Choose C Text area Add some thoughts of your own... Type here...

8 © Netskills Quality Internet Training, University of Newcastle Secret Stuff? Passwords Care to give us a password? Hidden fields

9 © Netskills Quality Internet Training, University of Newcastle Submit and Reset B uttons The submit button sends form data to be processed An image may also be used to submit a form The reset button returns fields to original state

10 © Netskills Quality Internet Training, University of Newcastle How to make it work Specify how to send the form data Specified with the method attribute GET or POST or If not specified – default is GET Specify where to send the form data Specified by the action attribute Usually a script or program – can be local or full URL

11 © Netskills Quality Internet Training, University of Newcastle The GET Method Client makes an HTTP GET request for a script Form data is appended to the script URL as name/value pairs – a querystring The script it has access to values sent in the querystring In addition Input data can be hard-coded directly in a URL No need for a form Results can be bookmarked

12 © Netskills Quality Internet Training, University of Newcastle The POST Method Client makes an HTTP POST request for a script Form data is sent as name/value pairs in the body of the request In addition Useful for large amounts of data Browser may truncate a long querystring Data is not visible in the URL Results cannot be bookmarked Form data arrives as a separate portion of the request – the body of the POST No querystring in URL requested inputbox=Arnold&choice=A&BoxB=yes

13 © Netskills Quality Internet Training, University of Newcastle Form Processing Scripts Scripts are run by the web server via a web server application CGI, PHP, ASP, ColdFusion etc… Scripts can be written in almost any language PHP, VBScript, Perl, CFML etc… Language may depend on web server application(s) Scripts receive form input from via GET or POST Process input based on instructions in the script Create an message Perform database query Write information to a file Generate a web page

14 © Netskills Quality Internet Training, University of Newcastle Form Processing Query database? Name: Arnold Comments: "whoopie doo!"... User submits form to web server Web server passes form data to processing script Write a file? Send ? Return a web page?

15 © Netskills Quality Internet Training, University of Newcastle Summary Forms are created in web pages using HTML tags HTML only provides and interface for user interaction Form input tags must all be named! Forms normally require a script to process them Forms can be submitted to a script using GET or POST Scripts are programs that are usually run on the web server Scripts can do many things!