1 HTML Forms. Objectives You will be able to: Compose HTML forms, to accept input from the user. Identify the different kinds of input tags that can appear.

Slides:



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

PHP Workshop ‹#› Forms (Getting data from users).
Video, audio, embed, iframe, HTML Form
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.
Using Entities & Creating Forms Jill R. Sommer Institute for Applied Linguistics Kent State University.
Web Development & Design Foundations with XHTML Chapter 9 Key Concepts.
Chapter 10 Form Basics Key Concepts Copyright © 2013 Terry Ann Morris, Ed.D 1.
11 ASP.NET Controls Beginning ASP.NET 4.0 in C# 2010 Chapter 6.
Forms, Validation Week 7 INFM 603. Announcements Try placing today’s example in htdocs (XAMPP). This will allow you to execute examples that rely on PHP.
1 Web Developer & Design Foundations with XHTML Chapter 6 Key Concepts.
MS3304: Week 4 PHP & HTML Forms. Overview HTML Forms elements refresher Sending data to a script via an HTML form –The post vs. get methods –Name value.
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.
JavaScript & jQuery the missing manual Chapter 11
1 HTML Forms. 22 HTML forms provide a way for a user to send information back to the web server. Originally the user input was processed on the server.
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.
Lecture # 6 Forms, Widgets and Event Handling. Today Questions: From notes/reading/life? Share Personal Web Page (if not too personal) 1.Introduce: How.
BBK P1 Module2010/11 : [‹#›] Forms (Getting data from users)
Website Development with PHP and MySQL Saving Data.
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.
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.
HTML : Forms, Frames Instructor: Mr. Ahmed Al Astal ITGD4104 Department Requirement for senior student University of Palestine Faculty of IT.
ITCS373: Internet Technology Lecture 5: More HTML.
HTML FORMS GET/POST METHODS. HTML FORMS HTML Forms HTML forms are used to pass data to a server. A form can contain input elements like text fields, checkboxes,
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.
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 Form Widgets. Review: HTML Forms HTML forms are used to create web pages that accept user input Forms allow the user to communicate information back.
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.
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.
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.
Adapted from  2012 Prentice Hall, Inc. All rights reserved. 5 th ed: Chapter 2 and th ed: 4.11 SY306 Web and Databases for Cyber Operations.
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.
11 ASP.NET Server Controls Beginning ASP.NET in C# and VB Chapter 4.
Copyright (c) 2004 Prentice-Hall. All rights reserved. 1 Committed to Shaping the Next Generation of IT Experts. Project 6: Creating XHTML Forms Kelly.
Web Forms. Web Forms: A form allows our web visitors to submit information to us. Some examples uses for forms are to let the web user contact us, fill.
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.
FORMS Explained By: Jasdeep Kaur. Lecturer, Department of Computer Application, PGG.C.G., Sector: 42, Chandigarh.
111 State Management Beginning ASP.NET in C# and VB Chapter 4 Pages
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
How to Write Web Forms By Mimi Opkins.
>> More on HTML Forms
FORMS Explained By: Sarbjit Kaur.
ITE 115 Creating Web Page Forms
HTML/XHTML Forms 18-Sep-18.
Introducing Forms.
FORM OBJECT When creating an interactive web site for the Internet it is necessary to capture user input and process this input. Based on the result of.
Forms, cont’d.
HTML Forms 18-Apr-19.
© Hugh McCabe 2000 Web Authoring Lecture 8
Presentation transcript:

1 HTML Forms

Objectives You will be able to: Compose HTML forms, to accept input from the user. Identify the different kinds of input tags that can appear within an HTML form Describe how user inputs from HTML forms are conveyed to the server. 2

33 HTML Forms HTML forms provide a way for a user to send information back to the web server. Originally the user input was processed on the server by a script, typically written in Perl. Today we can write full fledged object-oriented programs to process the user input. The browser doesn’t know anything about what happens to the user input at the server. It just follows HTML rules for how to handle the form.

44 HTML Forms An HTML form is define by tag pair. One or more HTML input elements appear between and Text Input Radio Buttons Check Boxes Dropdown Lists Buttons Hidden Inputs The user’s inputs are sent to a server when the user clicks a “submit” button.

55 HTML Forms A method attribute on the tag specifies how the browser will return the user’s inputs to the server. An action attribute on the tag gives the URL of the application that is to receive and process the form’s data. Example:...

66 get vs. post Either method conveys the user’s inputs to the server as a series of name/value pairs. method="get" Appends input name/value pairs to the URL. Visible to the user. Easy for a user to fake. Normally used for small amounts of data. method="post" Embeds input name/value pairs in the HTTP Request message. Not visible to the user. OK for larger amounts of data. Possible for a sophisticated user to fake.

77 Form Demo There are examples of pages with HTML forms in the Downloads area of the class web site: /007_HTML_Forms/

88 Form Example

99 Source View <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" " A Form Example Please Register Last Name First Name

10 Source View Gender <input checked="checked" type="radio" name="Gender" value="Unspecified" /> Unspecified <input type="radio" name="Gender" value="Male" /> Male <input type="radio" name="Gender" value="Female" /> Female <input type="checkbox" name="CSE_Major" value="" /> CSE Dept. Major

Source View Classification <select style="width: 185px; position: static" name="Classification" > Freshman Sophomore Junior Senior Graduate Unclassified <input type="submit" name="Submit_Button" value="submit" /> <input type="hidden" name="Hidden" value="This is a hidden input"/>

12 Form Example in Chrome

13 The Form Filled In Click the submit button

14 The Requested URL file:///C:/Documents%20and%20Settings/Rollins/Desktop/form_demo.html ?LastName=Turner &FirstName=Rollins &Gender=Male &CSE_Major= &Classification=Graduate &Submit_Button=submit &Hidden=This+is+a+hidden+input Line breaks added Actually a single long line of text Everything after the ? is the “Query String” Note Name-Value pairs Separated by & Available to app software on the server.

15 The Requested Page The browser gets a clean version of the page.

method = post 16 /Downloads/007_HTML_Forms/form_demo_post.html

Completed Form 17 Click submit button.

Response 18 Clean copy of the form.

19 ASP.NET Postback In the rest of this course, we will develop ASP.NET apps. ASPX pages always include one HTML form. Uses post as its method. Uses own URL as its action. All user inputs are sent back to the server in a post request for the same page. Called postback. A key concept in ASP.NET

20 ASP.NET Postback In an ASP.NET application we will write C# (or VB) code to process the inputs. The input values will be conveniently available as properties of objects. End of Presentation