lecture06 - JavaScript Form Processing & Server-side...

Info iconThis preview shows pages 1–9. Sign up to view the full content.

View Full Document Right Arrow Icon
Lecture 6 JavaScript – Form Processing & Server-side Scripting Reading: [1] Zeid, Ch. 24 & 18; [3] Sebesta, Ch. 10 http://www.cs.man.ac.uk/~kechen/pages/teaching/comp17032
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
COMP17032 Web Technology and Practice 1 2 Aims Understand HTML form elements, JavaScript form object, the objects that correspond to form elements, client side validation of form input, data communication between clients and servers, CGI protocol, name/value pairs, pairs encoding and decoding
Background image of page 2
COMP17032 Web Technology and Practice 1 3 Objectives Form elements Form object and form element objects Form input validation Processing form data Examples: form validation Form data processing Processing web page data Client/Server architecture Basics of CGI protocol and scripting Structure of CGI scripts Web servers - Apache
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
COMP17032 Web Technology and Practice 1 4 Introduction •Lea rn how to create all possible form elements •Fo rm ha ve a front end and a back end • The two most important aspects of a form are – Validating form input –S to r
Background image of page 4
COMP17032 Web Technology and Practice 1 5 Review of XHTML Forms -1. • Forms give website owners the ability to receive information from their users or to allow users to personalize a website • A Web form can contain many types of input elements: –Tex t boxes – Password boxes –Bu
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
COMP17032 Web Technology and Practice 1 6 Review of XHTML Forms -2. • Form input values are processed by a program on the Web server and usually send another XHTML page back to the Web browser with either a set of results based on the user’s input, or a confirmation page • Forms can be located anywhere in the body of an XHTML document • Web page can contain more than one form, but forms cannot be nested
Background image of page 6
COMP17032 Web Technology and Practice 1 7 The <form> Element -1. •T h e <form> - element contains all of the input elements of the form • Attributes: –ac t ion – This attribute is required and provides the path to the program that will process the form data when the user submits the form –Examp les : <form action=”/cgi-bin/process.cgi” > <form action=”http://www.example.com/cgi- bin/process.cgi”
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
COMP17032 Web Technology and Practice 1 8 The <form> Element -2. –me thod – This attribute tells the web server how to process the data •Va lue s : •Ge t – This is the default value and will automatically assign this value if the method attribute is not present in the
Background image of page 8
Image of page 9
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 38

lecture06 - JavaScript Form Processing &amp; Server-side...

This preview shows document pages 1 - 9. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online