ASSIGNMENT 03 25 POINTS DUE DATE: Monday NOV 30 JAVASCRIPT, INPUT VALIDATION, REGEX See 2 nd slide for Form See 3 rd next slide for the required features.

Slides:



Advertisements
Similar presentations
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?
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.
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.
MWD1001 Website Production Using JavaScript with Forms.
JavaScript and the DOM Les Carr COMP3001 Les Carr COMP3001.
Tutorial 6 Creating a Web Form
JavaScript Forms Form Validation Cookies. What JavaScript can do  Control document appearance and content  Control the browser  Interact with user.
SE-2840 Dr. Mark L. Hornick 1 HTML input elements and forms.
Web Database Programming Input Validation. User Input on the Web Web browser built-in mechanisms –HTML Forms HTTP POST method –Hyperlinks HTTP GET method.
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,
Capturing user input: Using HTML FORMs CS4320 got here on 27/11/2003.
WDMD 170 – UW Stevens Point 1 WDMD 170 Internet Languages eLesson: Working with Forms in JavaScript (NON-audio version) © Dr. David C. Gibbs
HTML Tables and Forms Creating Web Pages with HTML CIS 133 Web Programming Concepts 1.
Modern JavaScript Develop And Design Instructor’s Notes Chapter 2- JavaScript in Action Modern JavaScript Design And Develop Copyright © 2012 by Larry.
. If the PHP server is an server or is aware of which server is the server, then one can write code that s information. –For example,
Lesson 8 Creating Forms with JavaScript
CST JavaScript Validating Form Data with JavaScript.
Client-Side programming with JavaScript 3
Advance Database Management Systems Lab no. 5 PHP Web Pages.
CNIT 133 Interactive Web Pags – JavaScript and AJAX JavaScript forms.
JavaScript Form Validation
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.
4-Sep-15 HTML Forms Mrs. Goins Web Design Class. Parts of a Web Form A Form is an area that can contain Form Control/Elements. Each piece of information.
JS: DOM Form Form Object Form Object –The Form object represents an HTML form. –For each instance of a tag in an HTML document, a Form object is created.
HTML Forms What is a form.
Copyright ©2005  Department of Computer & Information Science Introducing DHTML & DOM: Form Validation.
Page: 1 Creating AJAX-Powered Forms with the Dojo Toolkit Presented By: James Harmon Object Training Group, Inc.
Scott Marino MSMIS Summer Session Web Site Design and Authoring Session 9 Scott Marino.
Chapter 5 Java Script And Forms JavaScript, Third Edition.
JavaScript II ECT 270 Robin Burke. Outline JavaScript review Processing Syntax Events and event handling Form validation.
Robinson_CIS_285_2005 HTML FORMS CIS 285 Winter_2005 Instructor: Mary Robinson.
CSS Class 7 Add JavaScript to your page Add event handlers Validate a form Open a new window Hide and show elements Swap images Debug JavaScript.
TUTORIAL 10: PROGRAMMING WITH JAVASCRIPT Session 3.
INTRODUCTION TO JAVASCRIPT AND DOM Internet Engineering Spring 2012.
JavaScript, Fourth Edition Chapter 5 Validating Form Data with JavaScript.
NMD202 Web Scripting Week3. What we will cover today Includes Exercises PHP Forms Exercises Server side validation Exercises.
CS 174: Web Programming September 30 Class Meeting Department of Computer Science San Jose State University Fall 2015 Instructor: Ron Mak
 Whether using paper forms or forms on the web, forms are used for gathering information. User enter information into designated areas, or fields. Forms.
PHP Form Introduction Getting User Information Text Input.
HTML Form Teppo Räisänen LIIKE/OAMK Basic Structure of a HTML Form The element defining a form is ’form’ Form’s most important attributes are The.
1 HTML Forms
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.
HTML Forms. Slide 2 Forms (Introduction) The purpose of input forms Organizing forms with a and Using different element types to get user input A brief.
Form Handling IDIA 618 Fall 2014 Bridget M. Blodgett.
Copyright © Texas Education Agency, All rights reserved.1 Web Technologies Website Forms / Data Acquisition.
INT222 - Internet Fundamentals Shi, Yue (Sunny) Office: T2095 SENECA COLLEGE.
Event Handling. Objectives Using event handlers Simulating events Using event-related methods.
©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.
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.
ASSIGNMENT 02 – Week of Nov 16 th IDEAS SQL insert and update statements Programmers-defined functions in PHP PHP safe IO functions: mysql_real_escape_string.
1 HTML Forms
LESSON : EVENTS AND FORM VALIDATION -JAVASCRIPT. EVENTS CLICK.
Internet & World Wide Web How to Program, 5/e Copyright © Pearson, Inc All Rights Reserved.
Introduction to JavaScript MIS 3502, Spring 2016 Jeremy Shafer Department of MIS Fox School of Business Temple University 2/2/2016.
Strings Robin Burke IT 130. Outline Objects Strings methods properties Basic methods Form validation.
INTERNET APPLICATIONS CPIT405 Forms, Internal links, meta tags, search engine friendly websites.
Tutorial 6 Creating a Web Form
FORMS Explained By: Jasdeep Kaur. Lecturer, Department of Computer Application, PGG.C.G., Sector: 42, Chandigarh.
INTRODUCTION ABOUT DIV Most websites have put their content in multiple columns. Multiple columns are created by using or elements. The div element is.
Introduction to JavaScript MIS 3502, Fall 2016 Jeremy Shafer Department of MIS Fox School of Business Temple University 9/29/2016.
JavaScript, Sixth Edition
Chapter 5 Validating Form Data with JavaScript
Due Dec 9th simple CHAT with
Data Validation and Protecting Workbook
Web Programming– UFCFB Lecture 17
Validation and Building Small Apps
Unit 27 - Web Server Scripting
JavaScript Form Validation
Presentation transcript:

ASSIGNMENT POINTS DUE DATE: Monday NOV 30 JAVASCRIPT, INPUT VALIDATION, REGEX See 2 nd slide for Form See 3 rd next slide for the required features Humpty-Dumpty Problem: Break the address information into pieces and apply Javascript to validate these components. Once the valid inputs are sent to the web server glue them back together w. PHP again as the complete Address and register them to the database as usual. There is also an embedded PHP-generated menu in the Form.

Legend for EXTENDED HTML REGISTRATION form submit Labels Password fields Text field field Legend for Broken-up Address Text fields The usual hyperlinks … PHP Dynamic Generated Menu from DB table HTML5 Pattern attribute In text field Menu Javascript tested Pattern w. onblur Event; textarea User Fullname Major Cell Confirm Password User password Town Street address State Zipcode

1. PHP Dynamic Generated Menu from DB table 4. HTML5 Pattern attribute In text field 3. Menu 2. Javascript tested Pattern w. onblur Event; textarea Town Street address State Zipcode 1.Use PHP script to generate menu of NJ towns to be embedded in the form as an input element. See also Video 7G. 2.Use Javascript [similar to the one used to compare passwords for equality.] But here script is called on an onblur event in the textarea. The onblur triggers a new Javascript function that might be named (for example) check_address(). This function should enter in a warning in a span element if the contents have characters other than alphanumeric characters or commas, dashes, and periods as might occur in a street address. But no other characters. If there is an illegal character (anything but those mentioned) then enter a warning, else erase any current span warning. However, do not erase the contents of the textarea as we did in the password equality script. [It would be annoying to force a user to re-enter the entire street address.] To block the form if invalid data is still present - see (5) below. 3.Any hard-coded or PHP-generated menu will do for this. Remember to give the menu/select element a name since it is an input element in a form. 4.Test for a valid 5 digit or 9 digit zip code. Either length is considered valid. Use the HTML5 pattern attribute and a simple pattern. Videos 7A and 7B are relevant. PHP side: When the address inputs are received from the browser you can sanitize them with mysql_real_escape_string as usual -- then just concatenate them together as the complete address to be inserted into the Address column of the REGISTERED table. 5.Introduce an onsubmit event in the tag that calls a function named blocker() as in onsubmit="return blocker()". The blocker function should return false if the span warning for the textarea is non-empty that is its.innerHTML != "" else it should return true. This will block the form's submission if false is returned. BONUS: Use an onkeyup event for the textarea to call a function that detects errors as they are typed or removes existing warnings as error corrected. See Video 7D for demo with similar behavior.