HTML forms and the dynamic web

Size: px
Start display at page:

Download "HTML forms and the dynamic web"

Transcription

1 HTML forms and the dynamic web Antonio Lioy < > english version created by Marco D. Aime < > Politecnico di Torino Dip. Automatica e Informatica timetable.html departure Using HTML forms to send data in the dynamic web arrival from=torino&to=roma&day=31/03/07 date SUBMIT RESET timetable.asp timetable.asp Torino Roma 6:50 8:00 7:45 8:55 browser <html>... </html> server (dynamic) A.Lioy - Politecnico di Torino ( ) H-1

2 Base structure of HTML forms NAME (or ID): symbolic name to refer to the form ACTION: relative URL to a CGI, PHP, ASP script or to any type of elaboration on the server METHOD: GET or POST the elements in a form are called controls <form name="f1" method="get" action=" <input...> <select...>... <input type="submit"...> <input type="reset"...> tag INPUT Form: input controls TYPE: text, password, checkbox, radio, image, file, hidden, submit, reset, button NAME: symbolic name (use ID if unique) to pass data to the server via HTTP to access the element from client-side scripts (e.g. JavaScript or VBScript) VALUE: initial content of the field or value to be sent <input type=... name=... value=...> A.Lioy - Politecnico di Torino ( ) H-2

3 SUBMIT Form: buttons created with the tag INPUT sends form data to the web server RESET created with the tag INPUT set all the controls in the form to their default value BUTTON created with the tag BUTTON type=submit reset button richer (e.g. text + image) than INPUT SUBMIT/RESET and can be used outside a form too Form: text oriented controls <input type=text size=n maxlength=m name= > text line long N characters, at maximum M <input type=password p > as type=text but shows characters as * it is NOT a secure method to hide a password <input type=hidden name= value= > fixed value to be sent to the server in hidden way it is NOT a secure method to hide data <textarea rows=nr cols=nc name= >... initial text... </textarea> text field of NR rows, each one with NC characters A.Lioy - Politecnico di Torino ( ) H-3

4 Form example (text, password) <form action="/cgi-bin/query" method="get"> your name: <input type="text" text name="name"> <br> your home page: <input type="text" name="home" value=" password: <input type="password" name="pswd"> <br> <input type="submit" value="ok"> <input type="reset" value= cancel"> Form: single choice control (menu) tag SELECT to enclose the various options tag OPTION for the various options, possibly with a default choice (SELECTED) tag OPTGROUP to group options (cascading menus; a single grouping level) prefer the attribute LABEL <select name=...> <select name...> <option label=... > <option>... </option> <option selected>... </option> </select> A.Lioy - Politecnico di Torino ( ) H-4

5 Form: multiple choice controls CHECKBOX element of type on/off independent from other controls of the same type all the selected ones (CHECKED) are sent to the server may also send nothing to the server RADIO a set of element of type on/off identified by the same NAME (in this case you cannot use ID) mutually exclusive (you can select only one) the value of the (single) selected element (CHECKED) is sent to the server Example of form (checkbox) <form action="/cgi-bin/query" method="get"> Compose your own fruit salad: <br> <input type="checkbox" name="banana"> Banana <input type="checkbox" name="apple" checked> Apple <input type="checkbox" name="orange"> Orange (red) <br> <input type="submit"> <input type="reset"> A.Lioy - Politecnico di Torino ( ) H-5

6 Example of form (radio) <form action="/cgi-bin/query" method="get"> Select your preferred fruit: <input type="radio" name="frt" value="banana"> Banana <input type="radio" name="frt" value="apple" checked> Apple <input type="radio" name="frt" value="orange"> Orange (red) <br> <input type="submit"> <input type="reset"> Disabled or read-only controls attribute readonly does not allow the user to change the value of a control (still possible via client-side script) valid in INPUT and TEXTAREA controls attribute disabled disables the control the user cannot change the value it will not be sent to the server valid in INPUT, TEXTAREA, BUTTON, SELECT, OPTION, OPTGROUP controls Boolean attributes modifiable by client-side scripts A.Lioy - Politecnico di Torino ( ) H-6

7 Form: file upload the control <input type="file" > inserts an element to select the name of a file the actual nature of the control depends on the browser, but typically: text field to directly insert the file name button to activate a graphical interface (navigation of the local file system and selection of a file) all the form data are sent individually as parts of a MIME message usable only with POST and the specific MIME type: <form action=... enctype="multipart/form-data" method="post"> Form example (file upload) <form action="/cgi/fileprint" enctype="multipart/form-data" method="post"> File to be printed: <input type="file" name="myfile"> Number of copies to be printed: <input type="text" name="copies" size="2"> <br><br> <input type="submit" value="submit"> A.Lioy - Politecnico di Torino ( ) H-7

8 File upload C > S transfer POST /cgi/fileprint HTTP/1.1 Host: server.it Content-Type: multipart/form-data; boundary=aabb Content-Length: AaBb Content-Disposition: form-data; name="myfile"; filename="timetable.txt" Content-Type: text/plain 8:30-12:30 room 12 --AaBb Content-Disposition: form-data; name="copies" 3 --AaBb-- Using scripts to validate forms the DOM event model is used to activate a clientside script typically, a script is associated to the event onsubmit: the script is executed when pressing the button Submit if the script returns the value "true", than the data is sent to the server, otherwise not it is possible to associate scripts to other events to validate individual controls as soon as new data is inserted A.Lioy - Politecnico di Torino ( ) H-8

9 Example of a script to validate a form <form name="sample" method="post" action=... onsubmit="return validateform()"> Name: <input type="text" name="name" size="30"><br> Age: <input type="text" name="age" size="3"><br> Birthday: <input type="text" name="birthday" size="10"><br> <input type="submit"> <input type="reset"> Validation script <script type="text/javascript"> function validateform() { formobj = document.sample; if (formobj.name.value == "") { alert("insert your name!"); return false; } else if (formobj.age.value == "") { alert("insert your age!"); return false; } else if... return false; return true; } </script> 19 A.Lioy - Politecnico di Torino ( ) H-9

10 How to validate? check that the value of the control: is not empty (if possible given the type) has a correct value ("looks good") rather than it does not have a wrong value ("doesn't look bad") example (validation of a text control used to enter an Italian ZIP code): must contain only numerical characters ('0' '9') must have exactly five characters (optionally) if the list of all possible ZIP codes is known, it must be included in this list in case of error, provide the user with a suggestion on how to correct the error (i.e. NOT wrong ZIP code) Transmission of form parameters (GET) URI = concatenation of the field action? the parameters represented according to the encoding application/x-www-form-urlencoded the body of the request remains empty A.Lioy - Politecnico di Torino ( ) H-10

11 application/x-www-form-urlencoded usable both with GET and POST is the default encoding generates a string composed by the names of the form controls followed by "=" and by the inserted values: name_ctrl1=val_ctrl1&name_ctrl2=val_ctrl2& separator between a control and the next one: & white spaces in names and values replaced by + special characters, not US-ASCII or with special meaning ( /? ) replaced by %xx (where "xx" is the hexadecimal number of their ISO code) Ex. x-www-form-urlencoded: form <form name="sample" method="get" action="/cgi-bin/acquire"> Name and surname: <input type="text" name="surname" size="30"><br> Number of children: <input type="text" name="children" size="3"><br> Birthday: <input type="text" name="birthday" size="10"><br> <input type="submit"> <input type="reset"> A.Lioy - Politecnico di Torino ( ) H-11

12 Ex. x-www-form-urlencoded: transmission if the previous form is filled by Mr. Marco Noè, born on 30/10/74, father of 3 children than the following string is created: surname=marco+no%e8&children=3&birthday=30%2f10%2f74 Transmission of form parameters (POST) URI is the values of the field action (default, i.e. enctype not specified) Content-Type: application/x-www-form-urlencoded Content-Length: body contains only the parameter string encoded according with the format application/x-www-formurlencoded con enctype=multipart/form-data Content-Type: multipart/form-data Content-Length: body = MIME message (one section per parameter) note: compulsory for controls of type File A.Lioy - Politecnico di Torino ( ) H-12

13 Example of data sent with GET : form <form method="get" action="/cgi/insroom"> <table border="0"> <tr> <td>room number:</td> <td><input type="text" size="8" name="num"></td> </tr> <tr> <td>location:</td> <td><input type="text" size="15" name="loc"></td> </tr> <tr> <td> <input type="submit" value="send"> <input type="reset" value="clear"> </td> </tr> </table> Ex. of data sent with GET : URI, HTTP, env URI HTTP channel (C > S) GET /cgi/insaula?num=12a&loc=main+site HTTP/1.1 Accept: image/gif, image/x-xbitmap,image/jpeg,*/* Referrer: Accept-Language: en Accept-Encoding: gzip, deflate User-Agent: Mozilla/4.0 (compatible;msie 6.0;Windows NT 5.0) Host: Connection: Keep-Alive num=12a&loc=main+site QUERY_STRING A.Lioy - Politecnico di Torino ( ) H-13

14 Data sent with POST (case 1) : form <form method="post" action="/cgi/insroom"> <table border="0"> <tr> <td>room number:</td> <td><input type="text" size="8" name="num"></td> </tr> <tr> <td>location:</td> <td><input type="text" size="15" name="txtloc"></td> </tr> <tr> <td> <input type="submit" value="send"> <input type="reset" value="clear"> </td> </tr> </table> Data sent with POST (case 1): URI,HTTP,env URI HTTP channel (C > S) POST /cgi/insaula HTTP/1.1 Accept: image/gif, image/x-xbitmap, image/jpeg, */* Referrer: Accept-Language: en Accept-Encoding: gzip, deflate User-Agent: Mozilla/4.0 (compatible;msie 6.0;Windows NT 5.0) Host: Connection: Keep-Alive Content-Type: application/x-www-form-urlencoded Content-Length: 26 num=12a&txtloc=main+site QUERY_STRING A.Lioy - Politecnico di Torino ( ) H-14

15 Data sent with POST (case 2) : form <form method="post" action="/cgi/insroom" enctype="multipart/form-data"> <table border="0"> <tr> <td>room number:</td> <td><input type="text" size="8" name="num"></td> </tr> <tr> <td>location:</td> <td><input type="text" size="15" name="txtloc"></td> </tr> <tr> <td> <input type="submit" value="send"> <input type="reset" value="clear"> </td> </tr> </table> Data sent with POST (case 2): URI,HTTP,env URI HTTP channel (C > S) POST /cgi/insroom HTTP/ Content-Type: multipart/form-data; boundary=aabbcc Content-Length: AaBbCc Content-Disposition: form-data; name="num" 12A --AaBbCc Content-Disposition: form-data; name="txtloc" Main Site --AaBbCc-- NOTE: unencoded value A.Lioy - Politecnico di Torino ( ) H-15

16 Attention to empty fields! apart the tag SELECT all other fields in a form may transmit no data and in one case (TYPE=CHECKBOX) also the variable of the field may be missing (if it is OFF) the server-side applications must be able to treat all the cases Example 1 <form name="sample" method="get" action=" Credit card: <input type="text" name="cardno" size="16"> <br> MasterCard <input type="radio" name="cc" value="mastercard"> <br> Visa <input type="radio" name="cc" value="visa"> <br> <input type="submit"> <input type="reset"> cardno= &cc=mastercard A.Lioy - Politecnico di Torino ( ) H-16

17 Example 2: form <form name="sample" method="get" action=" surname: <input type="text" name="surn" size="30"> <br> hobby: <ul> <li>fishing <input type="checkbox" name="cb_fish"> <li>skiing <input type="checkbox" name="cb_ski"> </ul> <input type="submit"> <input type="reset"> Example 2: data sent to the server the server-side application must manage the following cases (and other combinations ) surn= surn=de+chirico surn=de+chirico&cb_fishing=on surn=de+chirico&cb co&cb_ fishing=on&cb &cb_skiing=on A.Lioy - Politecnico di Torino ( ) H-17

18 Form: better transmitting with GET or POST? GET: allows checking the response page allows creating bookmarks and links to the page leaves trace of the parameters values inside the server s log (problem for privacy and/or security) some servers limit the length of the query string to 256 characters if enclosed in the URI POST: does not allow caching and bookmarking does not leave any trace in the logs does not pose any limit to the query string A.Lioy - Politecnico di Torino ( ) H-18

1 Form Basics CSC309

1 Form Basics CSC309 1 Form Basics Web Data 2! Most interesting web pages revolve around data! examples: Google, IMDB, Digg, Facebook, YouTube! can take many formats: text, HTML, XML, multimedia! Many of them allow us to access

More information

Summary 4/5. (contains info about the html)

Summary 4/5. (contains info about the html) Summary Tag Info Version Attributes Comment 4/5

More information

World Wide Web, etc.

World Wide Web, etc. World Wide Web, etc. Alex S. Raw data-packets wouldn t be much use to humans if there weren t many application level protocols, such as SMTP (for e-mail), HTTP & HTML (for www), etc. 1 The Web The following

More information

Spring 2014 Interim. HTML forms

Spring 2014 Interim. HTML forms HTML forms Forms are used very often when the user needs to provide information to the web server: Entering keywords in a search box Placing an order Subscribing to a mailing list Posting a comment Filling

More information

Web Programming. Based on Notes by D. Hollinger Also Java Network Programming and Distributed Computing, Chs.. 9,10 Also Online Java Tutorial, Sun.

Web Programming. Based on Notes by D. Hollinger Also Java Network Programming and Distributed Computing, Chs.. 9,10 Also Online Java Tutorial, Sun. Web Programming Based on Notes by D. Hollinger Also Java Network Programming and Distributed Computing, Chs.. 9,10 Also Online Java Tutorial, Sun. 1 World-Wide Wide Web (Tim Berners-Lee & Cailliau 92)

More information

Chapter 1 FORMS. SYS-ED/ Computer Education Techniques, Inc.

Chapter 1 FORMS. SYS-ED/ Computer Education Techniques, Inc. Chapter 1 FORMS SYS-ED/ Computer Education Techniques, Inc. Objectives You will learn: How to use forms and the related form types. Controls for interacting with forms. Menus and presenting users with

More information

CSE 154 LECTURE 8: FORMS

CSE 154 LECTURE 8: FORMS CSE 154 LECTURE 8: FORMS Web data most interesting web pages revolve around data examples: Google, IMDB, Digg, Facebook, YouTube, Rotten Tomatoes can take many formats: text, HTML, XML, multimedia many

More information

HTML Tables and Forms. Outline. Review. Review. Example Demo/ Walkthrough. CS 418/518 Web Programming Spring Tables to Display Data"

HTML Tables and Forms. Outline. Review. Review. Example Demo/ Walkthrough. CS 418/518 Web Programming Spring Tables to Display Data CS 418/518 Web Programming Spring 2014 HTML Tables and Forms Dr. Michele Weigle http://www.cs.odu.edu/~mweigle/cs418-s14/ Outline! Assigned Reading! Chapter 4 "Using Tables to Display Data"! Chapter 5

More information

CSE 154 LECTURE 9: SUBMITTING DATA (POST)

CSE 154 LECTURE 9: SUBMITTING DATA (POST) CSE 154 LECTURE 9: SUBMITTING DATA (POST) Drop-down list: , menus of choices that collapse and expand (inline) jerry george

More information

Forms, CGI. Objectives

Forms, CGI. Objectives Forms, CGI Objectives The basics of HTML forms How form content is submitted GET, POST Elements that you can have in forms Responding to forms Common Gateway Interface (CGI) Later: Servlets Generation

More information

The Hypertext Markup Language (HTML) Part II. Hamid Zarrabi-Zadeh Web Programming Fall 2013

The Hypertext Markup Language (HTML) Part II. Hamid Zarrabi-Zadeh Web Programming Fall 2013 The Hypertext Markup Language (HTML) Part II Hamid Zarrabi-Zadeh Web Programming Fall 2013 2 Outline HTML Structures Tables Forms New HTML5 Elements Summary HTML Tables 4 Tables Tables are created with

More information

HTML Forms. By Jaroslav Mohapl

HTML Forms. By Jaroslav Mohapl HTML Forms By Jaroslav Mohapl Abstract How to write an HTML form, create control buttons, a text input and a text area. How to input data from a list of items, a drop down list, and a list box. Simply

More information

Networking and Internet

Networking and Internet Today s Topic Lecture 13 Web Fundamentals Networking and Internet LAN Web pages Web resources Web client Web Server HTTP Protocol HTML & HTML Forms 1 2 LAN (Local Area Network) Networking and Internet

More information

HTML. HTML Evolution

HTML. HTML Evolution Overview stands for HyperText Markup Language. Structured text with explicit markup denoted within < and > delimiters. Not what-you-see-is-what-you-get (WYSIWYG) like MS word. Similar to other text markup

More information

Controlled Assessment Task. Question 1 - Describe how this HTML code produces the form displayed in the browser.

Controlled Assessment Task. Question 1 - Describe how this HTML code produces the form displayed in the browser. Controlled Assessment Task Question 1 - Describe how this HTML code produces the form displayed in the browser. The form s code is displayed in the tags; this creates the object which is the visible

More information

Forms, CGI. Cristian Bogdan 2D2052 / 2D1335 F5 1

Forms, CGI. Cristian Bogdan 2D2052 / 2D1335 F5 1 Forms, CGI Cristian Bogdan 2D2052 / 2D1335 F5 1 Objectives The basics of HTML forms How form content is submitted GET, POST Elements that you can have in forms Responding to forms Common Gateway Interface

More information

Forms, CGI. HTML forms. Form example. Form example...

Forms, CGI. HTML forms. Form example. Form example... Objectives HTML forms The basics of HTML forms How form content is submitted GET, POST Elements that you can have in forms Responding to forms CGI the Common Gateway Interface Later: Servlets Generation

More information

NETB 329 Lecture 13 Python CGI Programming

NETB 329 Lecture 13 Python CGI Programming NETB 329 Lecture 13 Python CGI Programming 1 of 83 What is CGI? The Common Gateway Interface, or CGI, is a set of standards that define how information is exchanged between the web server and a custom

More information

D B M G. Introduction to databases. Web programming: the HTML language. Web programming. The HTML Politecnico di Torino 1

D B M G. Introduction to databases. Web programming: the HTML language. Web programming. The HTML Politecnico di Torino 1 Web programming The HTML language The HTML language Basic concepts User interfaces in HTML Forms Tables Passing parameters stored in forms @2017 Politecnico di Torino 1 Basic concepts HTML: HyperText Markup

More information

Lesson 3. Form By Raymond Tsang. Certificate Programme in Cyber Security

Lesson 3. Form By Raymond Tsang. Certificate Programme in Cyber Security Lesson 3 Form By Raymond Tsang Certificate Programme in Cyber Security What is a form How to create a form Getting input from users Generate a result It s a section of a document containing normal content,

More information

Dynamic Form Processing Tool Version 5.0 November 2014

Dynamic Form Processing Tool Version 5.0 November 2014 Dynamic Form Processing Tool Version 5.0 November 2014 Need more help, watch the video! Interlogic Graphics & Marketing (719) 884-1137 This tool allows an ICWS administrator to create forms that will be

More information

HTTP Protocol and Server-Side Basics

HTTP Protocol and Server-Side Basics HTTP Protocol and Server-Side Basics Web Programming Uta Priss ZELL, Ostfalia University 2013 Web Programming HTTP Protocol and Server-Side Basics Slide 1/26 Outline The HTTP protocol Environment Variables

More information

HTML Tables and. Chapter Pearson. Fundamentals of Web Development. Randy Connolly and Ricardo Hoar

HTML Tables and. Chapter Pearson. Fundamentals of Web Development. Randy Connolly and Ricardo Hoar HTML Tables and Forms Chapter 5 2017 Pearson http://www.funwebdev.com - 2 nd Ed. HTML Tables A grid of cells A table in HTML is created using the element Tables can be used to display: Many types

More information

EDA095 HTTP. Pierre Nugues. March 30, Lund University

EDA095 HTTP. Pierre Nugues. March 30, Lund University EDA095 HTTP Pierre Nugues Lund University http://cs.lth.se/pierre_nugues/ March 30, 2017 Covers: Chapter 6, Java Network Programming, 4 rd ed., Elliotte Rusty Harold Pierre Nugues EDA095 HTTP March 30,

More information

Lecture 6: More Arrays & HTML Forms. CS 383 Web Development II Monday, February 12, 2018

Lecture 6: More Arrays & HTML Forms. CS 383 Web Development II Monday, February 12, 2018 Lecture 6: More Arrays & HTML Forms CS 383 Web Development II Monday, February 12, 2018 Lambdas You may have encountered a lambda (sometimes called anonymous functions) in other programming languages The

More information

Creating and Building Websites

Creating and Building Websites Creating and Building Websites Stanford University Continuing Studies CS 21 Mark Branom branom@alumni.stanford.edu Course Web Site: http://web.stanford.edu/group/csp/cs21 Week 7 Slide 1 of 25 Week 7 Unfinished

More information

HTML: Fragments, Frames, and Forms. Overview

HTML: Fragments, Frames, and Forms. Overview HTML: Fragments, Frames, and Forms Michael B. Spring Department of Information Science and Telecommunications University of Pittsburgh spring@ imap.pitt.edu http://www.sis. pitt.edu/~spring Overview Fragment

More information

Building Web Based Application using HTML

Building Web Based Application using HTML Introduction to Hypertext Building Web Based Application using HTML HTML: Hypertext Markup Language Hypertext links within and among Web documents connect one document to another Origins of HTML HTML is

More information

CMPT 165 INTRODUCTION TO THE INTERNET AND THE WORLD WIDE WEB

CMPT 165 INTRODUCTION TO THE INTERNET AND THE WORLD WIDE WEB CMPT 165 INTRODUCTION TO THE INTERNET AND THE WORLD WIDE WEB Unit 8 HTML Forms and Basic CGI Slides based on course material SFU Icons their respective owners 1 Learning Objectives In this unit you will

More information

Web Search An Application of Information Retrieval Theory

Web Search An Application of Information Retrieval Theory Web Search An Application of Information Retrieval Theory Term Project Summer 2009 Introduction The goal of the project is to produce a limited scale, but functional search engine. The search engine should

More information

Document Object Model. Overview

Document Object Model. Overview Overview The (DOM) is a programming interface for HTML or XML documents. Models document as a tree of nodes. Nodes can contain text and other nodes. Nodes can have attributes which include style and behavior

More information

CHAPTER 6: CREATING A WEB FORM CREATED BY L. ASMA RIKLI (ADAPTED FROM HTML, CSS, AND DYNAMIC HTML BY CAREY)

CHAPTER 6: CREATING A WEB FORM CREATED BY L. ASMA RIKLI (ADAPTED FROM HTML, CSS, AND DYNAMIC HTML BY CAREY) CHAPTER 6: CREATING A WEB FORM INTERACTION BETWEEN A WEB FORM AND A WEB SERVER Without a form, a website is read-only. It only provides information. EXAMPLES OF FORMS USAGE Performing searches Posting

More information

PYTHON CGI PROGRAMMING

PYTHON CGI PROGRAMMING PYTHON CGI PROGRAMMING http://www.tutorialspoint.com/python/python_cgi_programming.htm Copyright tutorialspoint.com The Common Gateway Interface, or CGI, is a set of standards that define how information

More information

LAB Test 1. Rules and Regulations:-

LAB Test 1. Rules and Regulations:- LAB Test 1 Rules and Regulations:- 1. Individual Test 2. Start at 3.10 pm until 4.40 pm (1 Hour and 30 Minutes) 3. Open note test 4. Send the answer to h.a.sulaiman@ieee.org a. Subject: [LabTest] Your

More information

core programming HTML Forms Sending Data to Server-Side Programs Marty Hall, Larry Brown

core programming HTML Forms Sending Data to Server-Side Programs Marty Hall, Larry Brown core programming HTML Forms Sending Data to Server-Side Programs 1 2001-2003 Marty Hall, Larry Brown http:// Agenda Sending data from forms The FORM element Text controls Push buttons Check boxes and radio

More information

LAB MANUAL SUBJECT: WEB TECHNOLOGY CLASS : T.E (COMPUTER) SEMESTER: VI

LAB MANUAL SUBJECT: WEB TECHNOLOGY CLASS : T.E (COMPUTER) SEMESTER: VI LAB MANUAL SUBJECT: WEB TECHNOLOGY CLASS : T.E (COMPUTER) SEMESTER: VI INDEX No. Title Pag e No. 1 Implements Basic HTML Tags 3 2 Implementation Of Table Tag 4 3 Implementation Of FRAMES 5 4 Design A FORM

More information

HTML. MPRI : Web Data Management. Antoine Amarilli Friday, December 7th 1/28

HTML. MPRI : Web Data Management. Antoine Amarilli Friday, December 7th 1/28 HTML MPRI 2.26.2: Web Data Management Antoine Amarilli Friday, December 7th 1/28 General presentation HyperText Markup Language Describes a Web page (not the only kind of Web content...) Normalized by

More information

Server-Side Web Programming: Python (Part 1) Copyright 2017 by Robert M. Dondero, Ph.D. Princeton University

Server-Side Web Programming: Python (Part 1) Copyright 2017 by Robert M. Dondero, Ph.D. Princeton University Server-Side Web Programming: Python (Part 1) Copyright 2017 by Robert M. Dondero, Ph.D. Princeton University 1 Objectives You will learn about Server-side web programming in Python Common Gateway Interface

More information

CSE 154 LECTURE 9: SUBMITTING DATA (POST)

CSE 154 LECTURE 9: SUBMITTING DATA (POST) CSE 154 LECTURE 9: SUBMITTING DATA (POST) Common UI control errors I changed the form's code... but when I refresh, the page doesn't update! By default, when you refresh a page, it leaves the previous

More information

Lecture (03) from static HTML to

Lecture (03) from static HTML to Lecture (03) from static HTML to dynamic CGI By: Dr. Ahmed ElShafee ١ Dr. Ahmed ElShafee, ACU : Spring 2016, Web Programming Forms Forms add the ability to web pages to not only provide the person viewing

More information

Hyperlinks, Tables, Forms and Frameworks

Hyperlinks, Tables, Forms and Frameworks Hyperlinks, Tables, Forms and Frameworks Web Authoring and Design Benjamin Kenwright Outline Review Previous Material HTML Tables, Forms and Frameworks Summary Review/Discussion Email? Did everyone get

More information

Overview of Forms. Forms are used all over the Web to: Types of forms: Accept information Provide interactivity

Overview of Forms. Forms are used all over the Web to: Types of forms: Accept information Provide interactivity HTML Forms Overview of Forms Forms are used all over the Web to: Accept information Provide interactivity Types of forms: Search form, Order form, Newsletter sign-up form, Survey form, Add to Cart form,

More information

Q1. What is JavaScript?

Q1. What is JavaScript? Q1. What is JavaScript? JavaScript was designed to add interactivity to HTML pages JavaScript is a scripting language A scripting language is a lightweight programming language JavaScript is usually embedded

More information

Parameterization in OpenSTA for load testing. Parameterization in OpenSTA Author: Ranjit Shewale

Parameterization in OpenSTA for load testing. Parameterization in OpenSTA Author: Ranjit Shewale Parameterization in OpenSTA Author: Ranjit Shewale (jcrvs@hotmail.com) Date: 14 th April 2003 What is OpenSTA? OpenSTA is a load testing tool used by performance test engineers. For more details please

More information

Collecting Information with Forms

Collecting Information with Forms C H A P T E R 1 Collecting Information with Forms O B J E C T I V E S In this chapter, you learn how to: Insert a form Create different types of text fields Insert Submit, Reset, and other buttons Present

More information

COMS 359: Interactive Media

COMS 359: Interactive Media COMS 359: Interactive Media Agenda Project #3 Review Forms (con t) CGI Validation Design Preview Project #3 report Who is your client? What is the project? Project Three action= http://...cgi method=

More information

Web Programming Step by Step

Web Programming Step by Step 1 of 24 Web Programming Step by Step Chapter 6 HTML Forms and Server-side Data Except where otherwise noted, the contents of this presentation are Copyright 2009 Marty Stepp and Jessica Miller. 6.1: Form

More information

Islamic University of Gaza Faculty of Engineering Department of Computer Engineering ECOM Advanced Internet Technology Lab.

Islamic University of Gaza Faculty of Engineering Department of Computer Engineering ECOM Advanced Internet Technology Lab. Islamic University of Gaza Faculty of Engineering Department of Computer Engineering ECOM 5049 Advanced Internet Technology Lab Lab # 1 Eng. Haneen El-masry February, 2015 Objective To be familiar with

More information

Outline. Introducing Form. Introducing Forms 2/21/2013 INTRODUCTION TO WEB DEVELOPMENT AND HTML

Outline. Introducing Form. Introducing Forms 2/21/2013 INTRODUCTION TO WEB DEVELOPMENT AND HTML Outline INTRODUCTION TO WEB DEVELOPMENT AND HTML Introducing Forms The element Focus Sending form data to the server Exercise Lecture 07: Forms - Spring 2013 Introducing Form Any form is declared

More information

Outline of Lecture 5. Course Content. Objectives of Lecture 6 CGI and HTML Forms

Outline of Lecture 5. Course Content. Objectives of Lecture 6 CGI and HTML Forms Web-Based Information Systems Fall 2004 CMPUT 410: CGI and HTML Forms Dr. Osmar R. Zaïane University of Alberta Outline of Lecture 5 Introduction Poor Man s Animation Animation with Java Animation with

More information

HTML crashcourse. general structure tables forms textfield textarea selectbox listbox hidden field checkbox radiobuttons submit button

HTML crashcourse. general structure tables forms textfield textarea selectbox listbox hidden field checkbox radiobuttons submit button HTML crashcourse general structure tables forms textfield textarea selectbox listbox hidden field checkbox radiobuttons submit button Andreas Schmidt HTML Crash-Kurs 1/10 general structure

More information

HTML and JavaScript: Forms and Validation

HTML and JavaScript: Forms and Validation HTML and JavaScript: Forms and Validation CISC 282 October 18, 2017 Forms Collection of specific elements know as controls Allow the user to enter information Submit the data to a web server Controls are

More information

PIC 40A. Lecture 19: PHP Form handling, session variables and regular expressions. Copyright 2011 Jukka Virtanen UCLA 1 05/25/12

PIC 40A. Lecture 19: PHP Form handling, session variables and regular expressions. Copyright 2011 Jukka Virtanen UCLA 1 05/25/12 PIC 40A Lecture 19: PHP Form handling, session variables and regular expressions 05/25/12 Copyright 2011 Jukka Virtanen UCLA 1 How does a browser communicate with a program on a server? By submitting an

More information

CSE 154 LECTURE 19: FORMS AND UPLOADING FILES

CSE 154 LECTURE 19: FORMS AND UPLOADING FILES CSE 154 LECTURE 19: FORMS AND UPLOADING FILES Exercise: Baby name web service JSON Modify our babynames.php service to produce its output as JSON. For the data: Morgan m 375 410 392 478 579 507 636 499

More information

COSC 2206 Internet Tools. The HTTP Protocol

COSC 2206 Internet Tools. The HTTP Protocol COSC 2206 Internet Tools The HTTP Protocol http://www.w3.org/protocols/ What is TCP/IP? TCP: Transmission Control Protocol IP: Internet Protocol These network protocols provide a standard method for sending

More information

WEBD 236 Web Information Systems Programming

WEBD 236 Web Information Systems Programming WEBD 236 Web Information Systems Programming Week 4 Copyright 2013-2017 Todd Whittaker and Scott Sharkey (sharkesc@franklin.edu) Agenda This week s expected outcomes This week s topics This week s homework

More information

HTML 5 Tables and Forms

HTML 5 Tables and Forms Tables for Tabular Data Display HTML 5 Tables and Forms Tables can be used to represet information in a two-dimensional format. Typical table applications include calendars, displaying product catelog,

More information

Form Overview. Form Processing. The Form Element. CMPT 165: Form Basics

Form Overview. Form Processing. The Form Element. CMPT 165: Form Basics Form Overview CMPT 165: Form Basics Tamara Smyth, tamaras@cs.sfu.ca School of Computing Science, Simon Fraser University October 26, 2011 A form is an HTML element that contains and organizes objects called

More information

Chapter4: HTML Table and Script page, HTML5 new forms. Asst. Prof. Dr. Supakit Nootyaskool Information Technology, KMITL

Chapter4: HTML Table and Script page, HTML5 new forms. Asst. Prof. Dr. Supakit Nootyaskool Information Technology, KMITL Chapter4: HTML Table and Script page, HTML5 new forms Asst. Prof. Dr. Supakit Nootyaskool Information Technology, KMITL Objective To know HTML5 creating a new style form. To understand HTML table benefits

More information

HTML Form. Kanida Sinmai

HTML Form. Kanida Sinmai HTML Form Kanida Sinmai ksinmai@tsu.ac.th http://mis.csit.sci.tsu.ac.th/kanida HTML Form HTML forms are used to collect user input. The element defines an HTML form: . form elements. Form

More information

cwhois Manual Copyright Vibralogix. All rights reserved.

cwhois Manual Copyright Vibralogix. All rights reserved. cwhoistm V2.12 cwhois Manual Copyright 2003-2015 Vibralogix. All rights reserved. This document is provided by Vibralogix for informational purposes only to licensed users of the cwhois product and is

More information

Practice problems. 1 Draw the output for the following code. 2. Draw the output for the following code.

Practice problems. 1 Draw the output for the following code. 2. Draw the output for the following code. Practice problems. 1 Draw the output for the following code. form for Spring Retreat Jacket company Spring Retreat Jacket Order Form please fill in this form and click on

More information

HTML Element A pair of tags and the content these include are known as an element

HTML Element A pair of tags and the content these include are known as an element HTML Tags HTML tags are used to mark-up HTML elements. HTML tags are surrounded by the two characters < and >. The surrounding characters are called angle brackets HTML tags are not case sensitive,

More information

CS105 Perl: Perl CGI. Nathan Clement 24 Feb 2014

CS105 Perl: Perl CGI. Nathan Clement 24 Feb 2014 CS105 Perl: Perl CGI Nathan Clement 24 Feb 2014 Agenda We will cover some CGI basics, including Perl-specific CGI What is CGI? Server Architecture GET vs POST Preserving State in CGI URL Rewriting, Hidden

More information

ABSOLUTE FORM PROCESSOR ADMINISTRATION OPTIONS

ABSOLUTE FORM PROCESSOR ADMINISTRATION OPTIONS ABSOLUTE FORM PROCESSOR ADMINISTRATION OPTIONS The Absolute Form Processor is very easy to use. In order to operate the system, you just need the menu at the top of the screen. There, you ll find all the

More information

Application Note. Web Signing. Document version

Application Note. Web Signing. Document version Application Note Web Signing Document version 1.1 31.10.2008 Population Register Centre (VRK) Certification Authority Services P.O. Box 70 FIN-00581 Helsinki Finland http://www.fineid.fi Application Note

More information

Chapter 2: Interactive Web Applications

Chapter 2: Interactive Web Applications Chapter 2: Interactive Web Applications 2.1! Interactivity and Multimedia in the WWW architecture! 2.2! Interactive Client-Side Scripting for Multimedia! (Example HTML5/JavaScript)! 2.3! Interactive Server-Side

More information

The MIME format. What is MIME?

The MIME format. What is MIME? The MIME format Antonio Lioy < lioy@polito.it > english version created by Marco D. Aime < m.aime@polito.it it > Politecnico di Torino Dip. Automatica e Informatica What is MIME? Multipurpose Internet

More information

Web technologies. Web. basic components. embellishments in browser. DOM (document object model)

Web technologies. Web. basic components. embellishments in browser. DOM (document object model) Web technologies DOM (document object model) what's on the page and how it can be manipulated forms / CGI (common gateway interface) extract info from a form, create a page, send it back server side code

More information

Chapter 4 Sending Data to Your Application

Chapter 4 Sending Data to Your Application Chapter 4 Sending Data to Your Application Charles Severance and Jim Eng csev@umich.edu jimeng@umich.edu Textbook: Using Google App Engine, Charles Severance Unless otherwise noted, the content of this

More information

CS144 Notes: Web Standards

CS144 Notes: Web Standards CS144 Notes: Web Standards Basic interaction Example: http://www.youtube.com - Q: what is going on behind the scene? * Q: What entities are involved in this interaction? * Q: What is the role of each entity?

More information

Chapter 3 HTML Multimedia and Inputs

Chapter 3 HTML Multimedia and Inputs Sungkyunkwan University Chapter 3 HTML Multimedia and Inputs Prepared by D. T. Nguyen and H. Choo Web Programming Copyright 2000-2018 Networking Laboratory 1/45 Copyright 2000-2012 Networking Laboratory

More information

Form Processing in PHP

Form Processing in PHP Form Processing in PHP Forms Forms are special components which allow your site visitors to supply various information on the HTML page. We have previously talked about creating HTML forms. Forms typically

More information

Enterprise Knowledge Platform Adding the Login Form to Any Web Page

Enterprise Knowledge Platform Adding the Login Form to Any Web Page Enterprise Knowledge Platform Adding the Login Form to Any Web Page EKP Adding the Login Form to Any Web Page 21JAN03 2 Table of Contents 1. Introduction...4 Overview... 4 Requirements... 4 2. A Simple

More information

COMPUTER APPLICATIONS IN BUSINESS FYBMS SEM II

COMPUTER APPLICATIONS IN BUSINESS FYBMS SEM II CHAPTER 1: HTML 1. What is HTML? Define its structure. a. HTML [Hypertext Markup Language] is the main markup language for creating web pages and other information that can be displayed in a web browser.

More information

By the end of this section of the practical, the students should be able to:

By the end of this section of the practical, the students should be able to: By the end of this section of the practical, the students should be able to: Learn about the Document Object Model and the Document Object Model hierarchy Create and use the properties, methods and event

More information

Applications & Application-Layer Protocols: The Web & HTTP

Applications & Application-Layer Protocols: The Web & HTTP CPSC 360 Network Programming Applications & Application-Layer Protocols: The Web & HTTP Michele Weigle Department of Computer Science Clemson University mweigle@cs.clemson.edu http://www.cs.clemson.edu/~mweigle/courses/cpsc360

More information

jquery - Other Selectors In jquery the selectors are defined inside the $(" ") jquery wrapper also you have to use single quotes jquery wrapper.

jquery - Other Selectors In jquery the selectors are defined inside the $( ) jquery wrapper also you have to use single quotes jquery wrapper. jquery - Other Selectors In jquery the selectors are defined inside the $(" ") jquery wrapper also you have to use single quotes jquery wrapper. There are different types of jquery selectors available

More information

CGI Programming. What is "CGI"?

CGI Programming. What is CGI? CGI Programming What is "CGI"? Common Gateway Interface A means of running an executable program via the Web. CGI is not a Perl-specific concept. Almost any language can produce CGI programs even C++ (gasp!!)

More information

CSS Review. Objec(ves. Iden(fy the Errors. Fixed CSS. CSS Organiza(on

CSS Review. Objec(ves. Iden(fy the Errors. Fixed CSS. CSS Organiza(on Objec(ves CSS Review Discuss: Ø How Google Search Works Ø What Images You Can Use HTML Forms CSS Review Why CSS? What is the syntax of a CSS rule? What is the order of applying rules in the cascade? How

More information

Construction d Applications Réparties / Master MIAGE

Construction d Applications Réparties / Master MIAGE Construction d Applications Réparties / Master MIAGE HTTP and Servlets Giuseppe Lipari CRiSTAL, Université de Lille February 24, 2016 Outline HTTP HTML forms Common Gateway Interface Servlets Outline HTTP

More information

Programming web-based applications

Programming web-based applications Programming web-based applications Antonio Lioy < lioy@polito.it > english version created and modified by Marco D. Aime < m.aime@polito.it > Politecnico di Torino Dip. Automatica e Informatica World Wide

More information

blink.html 1/1 lectures/6/src/ form.html 1/1 lectures/6/src/

blink.html 1/1 lectures/6/src/ form.html 1/1 lectures/6/src/ blink.html 1/1 3: blink.html 5: David J. Malan Computer Science E-75 7: Harvard Extension School 8: 9: --> 11:

More information

JavaScript s role on the Web

JavaScript s role on the Web Chris Panayiotou JavaScript s role on the Web JavaScript Programming Language Developed by Netscape for use in Navigator Web Browsers Purpose make web pages (documents) more dynamic and interactive Change

More information

Programming web-based applications. World Wide Web (WWW) Protocols for the web. A.Lioy - Politecnico di Torino (2009) C-1

Programming web-based applications. World Wide Web (WWW) Protocols for the web. A.Lioy - Politecnico di Torino (2009) C-1 Programming web-based applications Antonio Lioy < lioy@polito.it it > english version created and modified by Marco D. Aime < m.aime@polito.it > Politecnico di Torino Dip. Automatica e Informatica World

More information

Forms, Form Events, and Validation. Bok, Jong Soon

Forms, Form Events, and Validation. Bok, Jong Soon Forms, Form Events, and Validation Bok, Jong Soon jongsoon.bok@gmail.com www.javaexpert.co.kr How to Access to Form In JavaScript, access forms through the Document Object Model (DOM). The first approach

More information

Web Site Design and Development Lecture 23. CS 0134 Fall 2018 Tues and Thurs 1:00 2:15PM

Web Site Design and Development Lecture 23. CS 0134 Fall 2018 Tues and Thurs 1:00 2:15PM Web Site Design and Development Lecture 23 CS 0134 Fall 2018 Tues and Thurs 1:00 2:15PM List box The element shows a list of options in a scroll-able box when size is

More information

Dynamic HTML becomes HTML5. HTML Forms and Server Processing. Form Submission to Web Server. DHTML - Mouse Events. CMST385: Slide Set 8: Forms

Dynamic HTML becomes HTML5. HTML Forms and Server Processing. Form Submission to Web Server. DHTML - Mouse Events. CMST385: Slide Set 8: Forms HTML Forms and Server Processing Forms provide a standard data entry method for users to send information to a web server Clicking button calls a script on server CGI = Common Gateway Interface CGI scripts

More information

UNIT-VI CREATING AND USING FORMS

UNIT-VI CREATING AND USING FORMS UNIT-VI CREATING AND USING FORMS To create a fully functional web application, you need to be able to interact with your users. The common way to receive information from web users is through a form. Forms

More information

CSC Web Technologies, Spring HTML Review

CSC Web Technologies, Spring HTML Review CSC 342 - Web Technologies, Spring 2017 HTML Review HTML elements content : is an opening tag : is a closing tag element: is the name of the element attribute:

More information

HTML User Interface Controls. Interactive HTML user interfaces. Document Object Model (DOM)

HTML User Interface Controls. Interactive HTML user interfaces. Document Object Model (DOM) Page 1 HTML User Interface Controls CSE 190 M (Web Programming), Spring 2007 University of Washington Reading: Sebesta Ch. 5 sections 5.1-5.7.2, Ch. 2 sections 2.9-2.9.4 Interactive HTML user interfaces

More information

HTTP Request Handling

HTTP Request Handling Islamic University of Gaza Faculty of Engineering Department of Computer Engineering ECOM 5049 Advanced Internet Technology Lab Lab # 5 HTTP Request Handling El-masry March, 2014 Objectives To be familiar

More information

Common Gateway Interface CGI

Common Gateway Interface CGI Common Gateway Interface CGI Copyright (c) 2013-2015 Young W. Lim. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2

More information

COM1004 Web and Internet Technology

COM1004 Web and Internet Technology COM1004 Web and Internet Technology When a user submits a web form, how do we save the information to a database? How do we retrieve that data later? ID NAME EMAIL MESSAGE TIMESTAMP 1 Mike mike@dcs Hi

More information

How to Set Up a Custom Challenge Page for Authentication

How to Set Up a Custom Challenge Page for Authentication How to Set Up a Custom Challenge Page for Authentication Setting up a custom challenge page is a three step process: 1. Create a custom challenge page. Deploy the created custom challenge page on your

More information

The HTTP Protocol HTTP

The HTTP Protocol HTTP The HTTP Protocol HTTP Copyright (c) 2013 Young W. Lim. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later

More information

Javascript, Java, Flash, Silverlight, HTML5 (animation, audio/video, ) Ajax (asynchronous Javascript and XML)

Javascript, Java, Flash, Silverlight, HTML5 (animation, audio/video, ) Ajax (asynchronous Javascript and XML) Web technologies browser sends requests to server, displays results DOM (document object model): structure of page contents forms / CGI (common gateway interface) client side uses HTML/CSS, Javascript,

More information

MORE JAVASCRIPT AND FORMS

MORE JAVASCRIPT AND FORMS 1 MORE JAVASCRIPT AND FORMS Continuing with JavaScript and Forms Announcements 2 At the demo on Monday, we will review Assignments 3, 4, and 5 CS380 3 Standup Discuss questions with your Scrum Team CS380

More information

CIS 339 Section 2. What is JavaScript

CIS 339 Section 2. What is JavaScript CIS 339 Section 2 Introduction to JavaScript 9/26/2001 2001 Paul Wolfgang 1 What is JavaScript An interpreted programming language with object-oriented capabilities. Shares its syntax with Java, C++, and

More information