Web Forms.

Slides:



Advertisements
Similar presentations
HTML Forms. collect information for passing to server- side processes built up from standard widgets –text-input, radio buttons, check boxes, option lists,
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.
Dreamweaver Forms Overview. Forms – A Little Review Most user/webpage communication is one way, like this: Most user/webpage communication is one way,
JavaScript Forms Form Validation Cookies. What JavaScript can do  Control document appearance and content  Control the browser  Interact with user.
Video, audio, embed, iframe, HTML Form
Chapter 31 Basic Form-Processing Techniques JavaServer Pages By Xue Bai.
Capturing user input: Using HTML FORMs User input Up till now, our HTML documents have all been directed at outputting information to the user However,
JavaScript Forms Form Validation Cookies CGI Programs.
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.
Capturing user input: Using HTML FORMs CS4320 got here on 27/11/2003.
Form Basics CS Web Data  Most interesting web pages revolve around data  examples: Google, IMDB, Digg, Facebook, YouTube, Rotten Tomatoes  can.
Python and Web Programming
USER INTERACTIONS: FORMS
Form Handling, Validation and Functions. Form Handling Forms are a graphical user interfaces (GUIs) that enables the interaction between users and servers.
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.
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.
1 Creating Web Forms in HTML Web forms collect information from customers Web forms include different control elements including: –Input boxes –Selection.
CSC 2720 Building Web Applications HTML Forms. Introduction  HTML forms are used to collect user input.  The collected input is typically sent to a.
Website Development with PHP and MySQL Saving Data.
LOGO FORMs in HTML CHAPTER 5 Eastern Mediterranean University School of Computing and Technology Department of Information Technology ITEC229 Client-Side.
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.
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.
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.
Button and Textbox. Input  Input objects are used to obtain input from the user viewing the webpage. They allow the user to interact with the Web. 
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.
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.
Netprog 2002 CGI Programming1 CGI Programming CLIENT HTTP SERVER CGI Program http request http response setenv(), dup(), fork(), exec(),...
Session 8: Working with Form iNET Academy Open Source Web Development.
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.
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.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 9 Key Concepts 1 Copyright © Terry Felke-Morris.
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.
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.
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
Creating Web Page Forms COE 201- Computer Proficiency.
Netprog CGI and Forms1 CGI and Forms A detailed look at HTML forms.
1 State and Session Management HTTP is a stateless protocol – it has no memory of prior connections and cannot distinguish one request from another. The.
Since you’ll need a place for the user to enter a search query. Every form must have these basic components: – The submission type defined with the method.
CIS 228 The Internet 12/6/11 Forms and Validation.
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 FORM. Form HTML Forms are used to select different kinds of user input. HTML forms are used to pass data to a server. A form can contain input elements.
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.
Simple PHP Web Applications Server Environment
2440: 141 Web Site Administration Web Forms Instructor: Joseph Nattey.
Section 10.1 Define scripting
Advanced HTML Tags:.
How to Write Web Forms By Mimi Opkins.
CIIT-Human Computer Interaction-CSC456-Fall-2015-Mr
CS3220 Web and Internet Programming HTML Tables and Forms
Play Framework: Introduction
FORMS Explained By: Sarbjit Kaur.
Passing variables between pages
Simple PHP application
Introducing Forms.
HTML Forms and User Input
Web Systems Development (CSC-215)
CGI Programming Part II UNIX Security
Dr. John P. Abraham Professor UTRGV eCommerce CSCI 6314
Forms, cont’d.
CS3220 Web and Internet Programming HTML Tables and Forms
HTTP GET vs POST SE-2840 Dr. Mark L. Hornick.
Creating Forms on a Web Page
Presentation transcript:

Web Forms

Web Forms A web form is an area of an HTML page that contains input areas When the user submits the form, the browser uses the information in the form to construct a URL and transmit the form data to a web application

A Form for Google Search <html> <body> <div align="center"> <img src="https://www.google.com/images/logo.png"> <br><br> <form action="https://www.google.com/search"> Enter your search words: <input type="text" name="q"><br><br> <input type="submit" value="Google Search"> </form> </div> </body> </html>

Form Anatomy <form> tag <input> tag action: specifies URL type: kind of input area name: used to create query parameter value: Default value for text box Label for button <form action="https://www.google.com/search"> Enter your search words: <input type="text" name="q"><br><br> <input type="submit" value="Google Search"> </form>

Form processing User clicks submit button on form Browser builds query string using data entered into <input> areas on form Browser constructs URL using action attribute + query string and sends to server Server processes request and sends response

Form Submission Example User enters "Python" in search box Browser builds URL: https://www.google.com/search?q=Python <form action="https://www.google.com/search"> Enter your search words: <input type="text" name="q"><br><br> <input type="submit" value="Google Search"> </form>

Handling Special Characters Spaces and certain other characters are not allowed in the query string The browser encodes these characters using the ASCII table See asciitable.com Spaces can be encoded either as + or as %20 Other special characters are encoded as % followed by two hex digits Your program does not need to decode the data retrieved using request.args

Flask Example A Flask application can display a form, and handle its submission When a form is generated by an application, its action attribute contains only the path, not the complete URL The browser fills in the rest of the URL automatically <form action="/hello"> … </form> See examples/webapps/helloform.py

Handling Errors Web applications need to handle errors and omissions on forms gracefully See examples/webapps/helloform_handle_errors.py

A Guessing Game Let's convert our guessing game to a web application We'll use a two-page design: Home page (/) Pick secret number Display guess form (submits to Guess page) Guess page (/guess) Check user's guess and give feedback

Remembering the Secret Number We must use a global variable to remember the secret number Local variables hold their values only while a function is running See /examples/webapps/guess.py