FORM-ORIENTED DATA ENTRY



Similar documents
HTML Form Widgets. Review: HTML Forms. Review: CGI Programs

<option> eggs </option> <option> cheese </option> </select> </p> </form>

HTML Forms and CONTROLS

07 Forms. 1 About Forms. 2 The FORM Tag. 1.1 Form Handlers

HTML Forms. Pat Morin COMP 2405

Internet Technologies

Further web design: HTML forms

By Glenn Fleishman. WebSpy. Form and function

PHP Form Handling. Prof. Jim Whitehead CMPS 183 Spring 2006 May 3, 2006

Web Design and Development ACS Chapter 13. Using Forms 11/30/2015 1

Viewing Form Results

JavaScript and Dreamweaver Examples

2- Forms and JavaScript Course: Developing web- based applica<ons

HTML Tables. IT 3203 Introduction to Web Development

Tutorial 6 Creating a Web Form. HTML and CSS 6 TH EDITION

Introduction to XHTML. 2010, Robert K. Moniot 1

XHTML Forms. Form syntax. Selection widgets. Submission method. Submission action. Radio buttons

FORMS. Introduction. Form Basics

JavaScript Basics & HTML DOM. Sang Shin Java Technology Architect Sun Microsystems, Inc. sang.shin@sun.com

In order for the form to process and send correctly the follow objects must be in the form tag.

Dynamic Web-Enabled Data Collection

Now that we have discussed some PHP background

Working with forms in PHP

Designing and Implementing Forms 34

Upload Center Forms. Contents. Defining Forms 2. Form Options 5. Applying Forms 6. Processing The Data 6. Maxum Development Corp.

CS412 Interactive Lab Creating a Simple Web Form

Real SQL Programming 1

Web Development 1 A4 Project Description Web Architecture

Fortigate SSL VPN 4 With PINsafe Installation Notes

**When entering properties and field name use all lowercase!

Dreamweaver Tutorials Creating a Web Contact Form

InternetVista Web scenario documentation

Inserting the Form Field In Dreamweaver 4, open a new or existing page. From the Insert menu choose Form.

Creating Basic HTML Forms in Microsoft FrontPage

A MODEL FOR THE AUTOMATION OF HTML FORM CREATION AND VALIDATION. Keywords: html, form, web, automation, validation, class, model.

JavaScript: Arrays Pearson Education, Inc. All rights reserved.

Tutorial: Creating a form that s the results to you.

Fortigate SSL VPN 3.x With PINsafe Installation Notes

Introduction to Web Design Curriculum Sample

Gravity Forms: Creating a Form

InPost UK Limited GeoWidget Integration Guide Version 1.1

CGI Programming. What is CGI?

SQL Injection for newbie

VDF Query User Manual

c. Write a JavaScript statement to print out as an alert box the value of the third Radio button (whether or not selected) in the second form.

How to Make a Working Contact Form for your Website in Dreamweaver CS3

PHP Tutorial From beginner to master

Lab 5 Introduction to Java Scripts

Inspiring Creative Fun Ysbrydoledig Creadigol Hwyl. Web Design in Nvu Workbook 1

Using Form Tools (admin)

About XML in InDesign

Novell Identity Manager

Web Development. Owen Sacco. ICS2205/ICS2230 Web Intelligence

WebSphere Business Monitor

TCP/IP Networking, Part 2: Web-Based Control

Client-side Web Engineering From HTML to AJAX

FRONTPAGE FORMS

Creating a Html Form in the CMA

Cut-to-the-Chase Series Web Foundations. HTML Assignment. By Eric Matthews Visit us at:

3M Information Technology

Fax via HTTP (POST) Traitel Telecommunications Pty Ltd 2012 Telephone: (61) (2) Page 1

Chapter 15: Forms. User Guide. 1 P a g e

Aras Corporation Aras Corporation. All rights reserved. Notice of Rights. Notice of Liability

Form And List. SuperUsers. Configuring Moderation & Feedback Management Setti. Troubleshooting: Feedback Doesn't Send

Tutorial: Building a Dojo Application using IBM Rational Application Developer Loan Payment Calculator

-SoftChalk LessonBuilder-

How to Create a Mobile Responsive Template in ExactTarget

Accessibility in e-learning. Accessible Content Authoring Practices

Module One: Getting Started Opening Outlook Setting Up Outlook for the First Time Understanding the Interface...

Quick Start Configuration Guide Salesforce.com Integration

Configuring Custom Fields in JEvents Club Addon

JOOMLA 2.5 MANUAL WEBSITEDESIGN.CO.ZA

Script Handbook for Interactive Scientific Website Building

ABSTRACT INTRODUCTION %CODE MACRO DEFINITION

Data Tool Platform SQL Development Tools

EBOX Digital Content Management System (CMS) User Guide For Site Owners & Administrators

FrontPage 2003: Forms

Creating Web Pages with HTML Simplified. 3rd Edition

Configuring iplanet 6.0 Web Server For SSL and non-ssl Redirect

This matches a date in the MM/DD/YYYY format in the years The date must include leading zeros.

A table is a collection of related data entries and it consists of columns and rows.

HOW TO CREATE AND SEND AN EXACTTARGET TEMPLATE-BASED

Intellect Platform - The Workflow Engine Basic HelpDesk Troubleticket System - A102

GTPayment Merchant Integration Manual

Turn editing on and under Add an Activity use the drop down list and click on Questionnaire.

UNIVERSITY OF CALGARY Information Technologies WEBFORMS DRUPAL 7 WEB CONTENT MANAGEMENT

PROJECT REPORT OF BUILDING COURSE MANAGEMENT SYSTEM BY DJANGO FRAMEWORK

«W3Schools Home Next Chapter» JavaScript is THE scripting language of the Web.

Making Content Editable. Create re-usable templates with total control over the sections you can (and more importantly can't) change.

Cover Page. Dynamic Server Pages Guide 10g Release 3 ( ) March 2007

Dynamic Content. Dynamic Web Content: HTML Forms CGI Web Servers and HTTP

Table of Contents INTRODUCTION... 2 HOME Dashboard... 5 Reminders... 8 Announcements Preferences Recent Items REQUESTS...

We automatically generate the HTML for this as seen below. Provide the above components for the teaser.txt file.

Webforms on a Drupal 7 Website 3/20/15

[COGNOS DATA TRAINING FAQS] This is a list of frequently asked questions for a Cognos user

Insert/Edit Link: Popup Tab

Creating Database Tables in Microsoft SQL Server

User Guide for Smart Former Gold (v. 1.0) by IToris Inc. team

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

Caldes CM12: Content Management Software Introduction v1.9

Transcription:

FORM-ORIENTED DATA ENTRY Using form to inquire and collect information from users has been a common practice in modern web page design. Many Web sites used form-oriented input to request customers opinions and do business. The form-oriented data entry consists of three major components: Input forms (to request data) Data Validation functions (to validate data received) Data Processing Module (to process the data received) We will use a hypothetical realty Web page as an example to illustrate the development process and related techniques. The web page, when first loads, will display a pop-up window to inform users the availability of new mortgage payment calculator. The web page will include a scrolling message that constantly displays, to remind visitors of the current low mortgage rates. The on-line mortgage payment calculator will allow users to enter the amount of mortgage, interest rate, and number of years for the mortgage. It then calculates the amount of monthly payment. Input Forms: All forms begin and end with the <Form> </Form> tag pair. You can include as many forms as you like within an HTML document. However, unlike frames, you cannot nest one form inside another form. Be sure to close each form with a closing </Form> tag. Attributes: The <Form> tag has the following attributes: Action: Specifies a URL (or e-mail address) to which a form s data will be submitted. Method: Determines how a form s data will be submitted. Get appends; Post separate. Enctype: Specifies the format of the data being submitted. Target: Specifies a window in which any results returned from the server appear. Name: Designates a name for the form For instance, the <Form method= post action= mailto:chu@ist.psu.edu> code would send the form s output to me. Input Fields: The input form can be in the format of text boxes, password, radio buttons, check boxes, standard buttons, and special buttons (e.g., reset, submit). The <Input> field has the following attributes: 1

Align: Specifies the alignment of an image created with the type attribute. Valid values are Absbottom, Absmiddle, Baseline, Bottom, Left, Middle, Right, Texttop and top. Checked: Determines whether or not a radio button or a check box is selected. Maxlength: Set the maximum number of characters that can be entered into a field. Name: Designated a name for the element. Size: Specifies the width (number of characters) for a textbox. SRC: Specifies the URL of an image. Type: Specifies the type of element such as text, radio, password, etc. Value: Sets an initial value in a field or a label for buttons. Syntax: The following HTML tags can be used to develop the data-entry form: <FORM Name= xxx > <INPUT type= text name= string value= size= number > <INPUT type= password name= string value= size= number > <INPUT type="radio" name="radio1"> <INPUT type="checkbox" name="checkbox1"> <INPUT type="button" name="button1" value="standard Button"> <INPUT type="reset"> <INPUT type="submit"> </FORM> <FORM Name = MortCalc > <Table> <TR><TD>Amount of Mortgage:</TD> <TD><INPUT Type= text Name= Amount value= Size= 9 ></TD> <TR><TD>Interest Rate as % (e.g., 7.9):</TD> <TD><INPUT Type = text Name= Rate value = Size= 9 ></TD> <TR><TD>Number of Years:</TD> <TD><INPUT Type= text Name= Years value= Size= 9 ></TD> <TR><TD>Monthly Payment:</TD> <TD><INPUT Type= text Name= Payment value= Size= 9 > </TD> 2

</Table> </FORM> <TR><TD><INPUT Type= Button value= Calculate onclick= Calc(MortCalc) > <INPUT Type= Reset ></TD> Radio Buttons: Each radio button requires a Value attribute. The radio buttons allows for only one selection. All radio buttons in the group must have the same name attributes. You can include the Checked attribute in the <Input> tag to select an initial value for a group of radio buttons. If the Checked attribute is not specified, the first radio button is selected. Check Box: Each check box requires a Value attribute. The check box allows for multiple selections. It is easier to have different names for each check box. You can include the Checked attribute in the <Input> tag to select an initial value for a group of check box. Textarea: You can use Textarea object to acquire user input where multiple entry lines is necessary. The general syntax of the textarea object is as follows: <Textarea Name= xxx Rows= number Cols= number OnChange= xxx OnSelect= xxx > Text to be displayed </Textarea> Data Validation: Data validation is one of the major components in data entry. Once user enters the data, a data validation function will be called to validate the data entered by the users. The data must not be blank and contains numeric data (not text or characters). If the data entered is not valid, an alert message box will be displayed to notify the user, the text box was cleared and the insertion point is placed back to the text box. The following statements or built-in function will be used: If Else Statement ParseInt(value, base). It will convert a string value into an integer number. Where the value is a string and the base is the format of numbers. 2 means binary base number, 8 means octal, and 10 means decimal. The function will strip the value after the decimal point to make it an integer value. ParseFlot(value). It will return the value as a floating-point number. 3

IsNaN(value). IsNaN stands for is Not a Number. It can be used to test for numeric values. The function will return a Boolean condition of true or false. Function Calc(myform) { var mortamount=document.mortcalc.amount.value var mortamount=parseint(mortamount,10) if (isnan(mortamount)) { alert( The loan amount is not a number! ) document.mortcalc.amount.value= document.mortcalc.amount.focus() else { var mortrate=document.mortcalc.rate.value var mortrate=parsefloat(mortrate) if (isnan(mortrate)) { alert( The interest rate is not a number! ) document.mortcalc.rate.value= document.mortcalc.rate.focus() else { var mortyears=document.mortcalc.years.value var mortyears=parseint(mortyears,10) if (isnan(mortyears)) { alert( The number of years is not a number! ) document.mortcalc.years.value= document.mortcalc.years.focus() document.mortcalc.payment.value=monthly(mortamount,mortrate,mortyears); Data Processing: Data processing module is used to process the data received from the user input. Normally the function will be activated once the user s click on a button (On_Click event). If the system also involves a database, the data can be saved to the database. function monthly(mortamount,mortrate,mortyears) { var Irate=mortRate/1200; var Pmts=mortYears*12; var Loan=mortAmount; 4

return Loan * (Irate / (1 - (1 / Math.pow(1+Irate,Pmts)))); Example: J15.htm shows a complete example of displaying a form, validating, and processing data. Run the code to get a feel of its use. Use the template file (templete.htm) as the basis for practice. Discuss when can the code be used in practice. 5