Form Validation-Client and Server Verifying your visitors form submissions Jon Brundage  CF developer/Section 508/web accessibility 

Slides:



Advertisements
Similar presentations
17 HTML, Scripting, and Interactivity Section 17.1 Add an audio file using HTML Create a form using HTML Add text boxes using HTML Add radio buttons and.
Advertisements

PHP I.
Session Variables Storing Session Variables on the Server.
JavaScript FaaDoOEngineers.com FaaDoOEngineers.com.
Lecture 6/2/12. Forms and PHP The PHP $_GET and $_POST variables are used to retrieve information from forms, like user input When dealing with HTML forms.
1 Topic 6 Processing Form Input. 2Outline Goals and Objectives Goals and Objectives Chapter Headlines Chapter Headlines Introduction Introduction Form.
Lesson 4 Advanced Forms Handling. Aggravations Long forms that make you scroll out of the normal viewing area Lets create a scrollable form that is a.
Server-Side vs. Client-Side Scripting Languages
DT211/3 Internet Application Development JSP: Processing User input.
Design of Web-based Systems IS Development: lecture 10.
Working with JavaScript. 2 Objectives Introducing JavaScript Inserting JavaScript into a Web Page File Writing Output to the Web Page Working with Variables.
Introduction to Active Server Pages
Multiple Tiers in Action
Web Page Behavior IS 373—Web Standards Todd Will.
Figure 1. Hit analysis in 2002 of database-driven web applications Hits by Category in 2002 N = 73,873 Results Reporting 27% GME 26% Research 20% Bed Availability.
1 Forms for the Web Tom Muck
August Chapter 1 - Essential PHP spring into PHP 5 by Steven Holzner Slides were developed by Jack Davis College of Information Science and Technology.
Web Design Scripting and the Web. Books on Scripting.
4.1 JavaScript Introduction
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.
JavaScript Teppo Räisänen LIIKE/OAMK HTML, CSS, JavaScript HTML defines the structure CSS defines the layout JavaScript is used for scripting It.
Languages in WEB Presented by: Jenisha Kshatriya BCM SS09.
Chapter 3 Using Validation Controls. What is a Validation Control? A control that validates the value in another control Renders as an HTML tag with an.
Derrick Rapley Maryland CFUG October 8, 2002.
HTML Forms and Scripts. Session overview What are forms? Static vs dynamic Client-side scripts –JavaScript.
Chapter 5 Java Script And Forms JavaScript, Third Edition.
Chapter 6: Forms JavaScript - Introductory. Previewing the Product Registration Form.
Validation Controls. Validation Server Controls These are a special type of Web server control. They significantly reduce some of the work involved in.
© 2004 – 2014 Web Site Optimizers, LLC 1 HTML5 Forms Make Life Easy For Your Mobile Users Tom Bowen President Web Site
XHTML Introductory1 Forms Chapter 7. XHTML Introductory2 Objectives In this chapter, you will: Study elements Learn about input fields Use the element.
Advanced Web Design Scripting Tutorial Chapters. Scripting Intro The scripting part of the forthcoming Advanced Web Design textbook introduces you to.
SEG3210 DHTML Tutorial. DHTML DHTML is a combination of technologies used to create dynamic and interactive Web sites. –HTML - For creating text and image.
Instant Web Sites Using ColdFusion MD CFUG 1/11/2005 Presented by Jon Brundage Accessibility Consultant, CF developer
Copyright ©2005  Department of Computer & Information Science Introducing DHTML & DOM: JavaScript & Forms.
Lesson 19. JavaScript errors Since JavaScript is an interpreted language, syntax errors will usually cause the script to fail. Both browsers will provide.
JavaScript is a client-side scripting language. Programs run in the web browser on the client's computer. (PHP, in contrast, is a server-side scripting.
Client Scripting1 Internet Systems Design. Client Scripting2 n “A scripting language is a programming language that is used to manipulate, customize,
1 Accelerated Web Development Course JavaScript and Client side programming Day 2 Rich Roth On The Net
Chapter 8 Cookies And Security JavaScript, Third Edition.
XP Tutorial 10New Perspectives on Creating Web Pages with HTML, XHTML, and XML 1 Working with JavaScript Creating a Programmable Web Page for North Pole.
Creating Dynamic Web Pages Using PHP and MySQL CS 320.
20-753: Fundamentals of Web Programming 1 Lecture 12: Javascript I Fundamentals of Web Programming Lecture 12: Introduction to Javascript.
 Whether using paper forms or forms on the web, forms are used for gathering information. User enter information into designated areas, or fields. Forms.
Introduction.  The scripting language most often used for client-side web development.  Influenced by many programming languages, easier for nonprogrammers.
XP Tutorial 10New Perspectives on HTML and XHTML, Comprehensive 1 Working with JavaScript Creating a Programmable Web Page for North Pole Novelties Tutorial.
JavaScript Syntax, how to use it in a HTML document
9/16/2000 Nat Papovich – Putting It All Together Putting It All Together: Developing Web Applications Using Fusebox and Frames Presented by Nat Papovich.
Scott Marino MSMIS Summer Session Web Site Design and Authoring Session 8 Scott Marino.
NMD202 Web Scripting Week5. What we will cover today PHP & MySQL Displaying Dynamic Pages Exercises Modifying Data PHP Exercises Assignment 1.
HTML JAVASCRIPT. CONTENTS Javascript Example NOSCRIPT Tag Advantages Summary Exercise.
8 Chapter Eight Server-side Scripts. 8 Chapter Objectives Create dynamic Web pages that retrieve and display database data using Active Server Pages Process.
JavaScript Overview Developer Essentials How to Code Language Constructs The DOM concept- API, (use W3C model) Objects –properties Methods Events Applications;
HTML FORMS The TEXT Object Presented By: Ankit Gupta.
ASP. ASP is a powerful tool for making dynamic and interactive Web pages An ASP file can contain text, HTML tags and scripts. Scripts in an ASP file are.
Document Object Model Nasrullah. DOM When a page is loaded,browser creates a Document Object Model of the Page.
Cf_FormSave Do you wish to Save your changes??. Hello My Name Is…. Kevin Penny, Age 27 Kevin Penny, Age 27 Advanced Macromedia Certified Developer (4.5,
Introduction to JavaScript MIS 3502, Spring 2016 Jeremy Shafer Department of MIS Fox School of Business Temple University 2/2/2016.
Navigation Framework using CF Architecture for a Client-Server Application using the open standards of the Web presented by Kedar Desai Differential Technologies,
XP Tutorial 10New Perspectives on HTML, XHTML, and DHTML, Comprehensive 1 Working with JavaScript Creating a Programmable Web Page for North Pole Novelties.
Unit 4 Working with data. Form Element HTML forms are used to pass data to a server. A form can contain input elements like text fields, checkboxes, radio-buttons,
Introduction to JavaScript MIS 3502, Fall 2016 Jeremy Shafer Department of MIS Fox School of Business Temple University 9/29/2016.
Cookies BIS1523 – Lecture 23.
Introduction to JavaScript
Client-Side Validation with Javascript
A second look at JavaScript
Introduction to JavaScript
Tutorial 10: Programming with javascript
Client-Server Model: Requesting a Web Page
3rd Party Widgets & Custom Code
Presentation transcript:

Form Validation-Client and Server Verifying your visitors form submissions Jon Brundage  CF developer/Section 508/web accessibility 

Why validate? Safety protects your database and site Better user experience Makes your site more professional Saves time Less submits and page calls

Two types of Validation Client Via Scripting Javascript most common May be defeated by disabling JS in browser Poses risks but convenient Saves server load Server Via CGI/ASP etc This discussion focuses on the power of CF Can’t be defeated by changes in browser settings Safer but less convenient

Client validation CFFORM Writes Javascript validation for you CFINPUT tag  hotfix.htm hotfix for CFMX hotfix.htm Javascript Write your own Many free scripts available on the Web     (DHTML)

Test for state of scripting on client Inside the FORM tag, add a NOSCRIPT tag with a hidden form field Use Isdefined(form.scriptOff) in action page with a CFIF tag to determine if you need to apply server side validation.

Server validation CF functions CF tags CF custom tags- developers exchange CF structures and arrays

CF STRUCTURE Contain variables called keys Create with a CFSET statement A structure with elements contained in it will have a count similar to query recordcount

CF STRUCTURE cont. Structures may be looped. #formErrors[errorType]#

Using a structure to hold errors as errors encountered, add to structure At the end of processing form errors, display by looping over the structure: #formErrors[errorType]#

Make use of CF functions IsNumeric Verify numeric fields Findoneof Look at characters And others! Use you creativity.

THANK YOU Remember, CF has many tools at your disposal. Have fun, be creative and don’t worry too much about “being right” Many ways to solve problems. Questions/comments-