Multimedia and the World Wide Web HCI 201 Lecture Notes #5B.

Slides:



Advertisements
Similar presentations
HTML Forms. collect information for passing to server- side processes built up from standard widgets –text-input, radio buttons, check boxes, option lists,
Advertisements

Tutorial 6 Creating a Web Form
XP 1 Creating Web Page Forms Designing a Product Registration Form Tutorial 6.
Creating Web Page Forms. Objectives Describe how Web forms can interact with a server-based program Insert a form into a Web page Create and format a.
Tutorial 6 Working with Web Forms
XP Tutorial 6: Creating Web Page Forms. XP An Example of a Form.
Gathering Requirements What do users want?. Information Gathering Techniques Surveys Interviews Focus Groups.
USER INTERACTIONS: FORMS
Tutorial 6 Working with Web Forms. XP Objectives Explore how Web forms interact with Web servers Create form elements Create field sets and legends Create.
Outline IS400: Development of Business Applications on the Internet Fall 2004 Instructor: Dr. Boris Jukic Table, Forms, Metatags and Frames.
Creating Web Page Forms
Tutorial 6 Forms Section A - Working with Forms in JavaScript.
Web Development & Design Foundations with XHTML Chapter 9 Key Concepts.
Chapter 9 Collecting Data with Forms. A form on a web page consists of form objects such as text boxes or radio buttons into which users type information.
1 Web Developer & Design Foundations with XHTML Chapter 6 Key Concepts.
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.
XP Tutorial 6New Perspectives on Creating Web Pages with HTML, XHTML, and XML 1 Creating Web Page Forms Designing a Product Registration Form Tutorial.
XP Tutorial 6New Perspectives on HTML and XHTML, Comprehensive 1 Creating Web Page Forms Designing a Product Registration Form Tutorial 6.
CO1552 Web Application Development HTML Forms. Websites can be made more interactive by providing facilities for users to provide data To get user entered.
1 Creating Web Forms in HTML Web forms collect information from customers Web forms include different control elements including: –Input boxes –Selection.
Web111a_chapt06.ppt HTML: Section 6 Forms HTML tags: define data input and/or output Define the Input and/or Output on the web page Do not process the.
Chapter 5 Java Script And Forms JavaScript, Third Edition.
Chapter 6: Forms JavaScript - Introductory. Previewing the Product Registration Form.
XHTML Introductory1 Forms Chapter 7. XHTML Introductory2 Objectives In this chapter, you will: Study elements Learn about input fields Use the element.
Robinson_CIS_285_2005 HTML FORMS CIS 285 Winter_2005 Instructor: Mary Robinson.
Tutorial 7 Creating Forms. Objectives Session 7.1 – Create an HTML form – Insert fields for text – Add labels for form elements – Create radio buttons.
JavaScript, Fourth Edition Chapter 5 Validating Form Data with JavaScript.
 2008 Pearson Education, Inc. All rights reserved Introduction to XHTML.
Chapter 8 Collecting Data with Forms. Chapter 8 Lessons Introduction 1.Plan and create a form 2.Edit and format a form 3.Work with form objects 4.Test.
HTML Forms.
LOGO FORMs in HTML CHAPTER 5 Eastern Mediterranean University School of Computing and Technology Department of Information Technology ITEC229 Client-Side.
1 © Netskills Quality Internet Training, University of Newcastle HTML Forms © Netskills, Quality Internet Training, University of Newcastle Netskills is.
ITCS373: Internet Technology Lecture 5: More HTML.
Tutorial 6 Working with Web Forms. XP Objectives Explore how Web forms interact with Web servers Create form elements Create field sets and legends Create.
Tutorial 6 Working with Web Forms. 2New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition Objectives Explore how Web forms interact with.
Creating Web Page Forms. Introducing Web Forms Web forms collect information from users Web forms include different control elements including: –Input.
1 HTML Forms
1 HTML Forms
FORMS. Forms are used to receive information from the web surfer, such as: their name, address, credit card, etc. Form fields are objects that allow.
XP 1 Tutorial 6 Creating Web Page Forms. XP 2 Tutorial Objectives  Describe how Web forms can interact with a server-based program  Review the various.
Forms Collecting Data CSS Class 5. Forms Create a form Add text box Add labels Add check boxes and radio buttons Build a drop-down list Group drop-down.
+ FORMS HTML forms are used to pass data to a server. begins and ends a form Forms are made up of input elements Every input element has a name and value.
Copyright © Texas Education Agency, All rights reserved.1 Web Technologies Website Forms / Data Acquisition.
©SoftMooreSlide 1 Introduction to HTML: Forms ©SoftMooreSlide 2 Forms Forms provide a simple mechanism for collecting user data and submitting it to.
Tutorial 6 Working with Web Forms. 2New Perspectives on HTML, XHTML, and XML, Comprehensive, 3rd Edition Objectives Explore how Web forms interact with.
Creating Web Page Forms COE 201- Computer Proficiency.
HTML Forms.
Week 10: HTML Forms HNDIT11062 – Web Development.
HTML Forms. A form is simply an area that can contain form fields. Form fields are objects that allow the visitor to enter information - for example text.
Chapter 9 Quick Links Slide 2 Performance Objectives Understanding Forms Planning Forms Creating Forms Creating Text Fields Creating Hidden Fields Creating.
1 HTML Forms
Creating Forms on a Web Page. 2 Introduction  Forms allow Web developers to collect visitor feedback  Forms create an environment that invites people.
Copyright (c) 2004 Prentice-Hall. All rights reserved. 1 Committed to Shaping the Next Generation of IT Experts. Project 6: Creating XHTML Forms Kelly.
1 HTML forms (cont.)
Internet & World Wide Web How to Program, 5/e Copyright © Pearson, Inc All Rights Reserved.
HTML III (Forms) Robin Burke ECT 270. Outline Where we are in this class Web applications HTML Forms Break Forms lab.
Lesson 5 Introduction to HTML Forms. Lesson 5 Forms A form is an area that can contain form elements. Form elements are elements that allow the user to.
HTML Structure II (Form) WEEK 2.2. Contents Table Form.
FORMS Explained By: Jasdeep Kaur. Lecturer, Department of Computer Application, PGG.C.G., Sector: 42, Chandigarh.
Ashima Wadhwa Java Script And Forms. Introduction Forms: –One of the most common Web page elements used with JavaScript –Typical forms you may encounter.
XP Tutorial 6New Perspectives on HTML, XHTML, and DHTML, Comprehensive 1 Creating Web Page Forms Designing a Product Registration Form Tutorial 6.
2440: 141 Web Site Administration Web Forms Instructor: Joseph Nattey.
Tutorial 6 Working with Web Forms
How to Write Web Forms By Mimi Opkins.
ITE 115 Creating Web Page Forms
CNIT 131 HTML5 - Forms.
Chapter 6: Creating Web Page Forms. An Example of a Form.
HTML Forms
Presentation transcript:

Multimedia and the World Wide Web HCI 201 Lecture Notes #5B

HCI 201 Notes #5B2 What will we learn today? How does form work What’s in Form elements Button Checkbox Radio Text Textarea Hidden

HCI 201 Notes #5B3 Case Study 4 Lisa Jacobs, the director of customer support for Jackson Electronics, would like to have a page for customer registration. Instead of having to fill out and mail back the registration card in the product package, customers can now do it online. The registration information will be sent via s to Lisa’s assistant. As you have guessed, Lisa asks us to create this registration page for her company.

HCI 201 Notes #5B4 How does form collect information 1.The user retrieves the form page from the web server. 2.The user sends the filled out form back to the sever. A CGI script running on the server retrieves and saves user’s input. 3.The CGI script may send some feedback to the user as confirmation

HCI 201 Notes #5B5 CGI scripts What’s a CGI script? Common Gateway Interface script is any program or sets of commands that performs tasks with the data it retrieves from the web page. Present static information  interact with readers. CGI scripts made it possible for us to Maintain online database Publish catalogues for online purchases Dynamically present information based on users’ profiles Record the number of times a web page has been accessed … CGI scripts can be written in different programming languages Visual Basic, JavaScript, ASP, C/C++, Perl, etc.

HCI 201 Notes #5B6 What’s in Function: Contains various controls/fields to collect inputs Attributes: action, method, name, etc. End tag:, never omitted. Contains: form controls Used in : body_content

HCI 201 Notes #5B7 What’s in One page can have several s, one after another. (You cannot nest one form inside another) action -Gives the URL of the CGI script that will retrieve and process the form’s data. Create an that looks like this: “FirstName=Andy&LastName=Davids&Address=634+Wabash+Ave& City=Chicago&State=IL&Date=Aug%2Fl10%2F2004&Notes=…”

HCI 201 Notes #5B8 What’s in Method - Tells the script how to retrieve the data from the form - get packages the form data by appending it to the end of the URL specified in action. Sever retrieves the data from the URL for the script program to process. - post sends form data in a separate data stream, allowing the server to retrieve data from name-value pairs (standard input). It is more flexible (any info.) and safer (data will not be truncated).

HCI 201 Notes #5B9 Form elements Most commonly used form controls Text boxes for (short) text and numerical entries Radio buttons to select a single option from a predefined group of (usually short) items Check boxes to select any number of options from a predefined group of items Selection lists for long lists of options (dropdown list, single selection list, multiple selection list) Text areas for extended entries that might include several lines of text. Buttons perform certain tasks upon being clicked (button, submit, reset)

HCI 201 Notes #5B10 Creating a form 1.Decide what information will be collected by this form 2.Decide what form controls should be used Short/long entry, single/multiple selections, limited choices, open answers, etc. 3.Decide the positions of these controls on your form Top-down, left-to-tight, form conventions, alignment. 4.Insert 5.Insert between the form tag. (a professional-looking form always needs help from.) 6.Locate controls in different cells according to 3. 7.Code for labels and each form control.

HCI 201 Notes #5B11 name specifies the name of this input field. - Some field might be required. (“To” is required in an submission) - Some CGI script is case-sensitive. (“ ” ≠ “ ”) value assigns an initial value to this input field. type decides what kind of input field it is. It can be any one of the following: button, checkbox, hidden, image, password, radio, reset, submit, text.

HCI 201 Notes #5B12 Textbox size defines the width of the textbox in number of characters.  The way it looks maxlength defines the maximum number of characters allowed in this textbox.  The way it works (what happens if size > maxlength? Or size<maxlength?) Last Name: label (e.g., “Last Name”) is a text description next to the input field so that users would know what to enter. Lisa wants to use limit-sized textbox for the first 8 fields.

HCI 201 Notes #5B13 Textbox value defines the default value of this field, which is the value that appears in the input box when the form is initially displayed. - Save time (if most of the users will enter the same value) - Increase accuracy (reduce typos) - Editable -Prevent critical information from being seen on screen (in * or  ). - Does not mean this information is encrypted during transmission via a secured conntection. - Good for login password, but might be less welcome for 16-digit credit card number. - name, size, maxlength.

HCI 201 Notes #5B14 Selection list option1 option2 option3 - name defines the name of this selection list. - Each option tag represents an entry in the list. can be omitted. - size is the number of entries in the selection list. When size equals to the number of options, we have a list without scrollbar. size=1  dropdown menu. (what if size > or < # of options?)

HCI 201 Notes #5B15 Selection list... - No width. The width of a selection list is decided by the widest item in the list. - No height. The height of a selection list is decided by the number of options available in the list. - multiple (with no value) allows the user to select multiple items from the list. *Form will send a name/value pair to the CG script for each selected items. The script should be able to handle one field with multiple values.

HCI 201 Notes #5B16 Selection list option1 option2 option3 - option# is the value displayed in the selection list (for users). - value is what’s been sent to the CGI script for processing. - selected specifies which option is initially selected/highlighted.

HCI 201 Notes #5B17 Radio buttons Apple Grape Banana - type=radio indicates this is a radio button control. - name must be the same for all the radio buttons in the same group, to guarantee only one of them can be selected by the user. - value is what will be sent to the CGI script for processing if that radio button is selected. - Add checked to the radio tag if it should be initially selected. - Need labels (Apple, Grape, Banana) to tell users what they are.

HCI 201 Notes #5B18 Check boxes Apple Grape Banana - Similar as radio buttons, but allow users to specify multiple selections. - type=checkbox indicates this is a checkbox control. - Checkbox works independently, so name should be different for the checkboxes “in the same group”. - A checkbox has the value=“on” if it is selected. But you can assign a different value. - Add checked in the tag if this checkbox should be initially selected. - Need labels (Apple, Grape, Banana) to tell users what they are.

HCI 201 Notes #5B19 Text area text you want to initially display in the textarea - Users’ input does not wrap in a textbox, but will be (by default) scrolled to the left as additional texts is typed. - To control warp : off, no wrapping (Enter key still works), users have to scroll to the right to see all the text. One line of text is sent to CGI script. 1  1 virtual, wraps automatically, but still sends all the text in one line to CGI script. N  1 physical, wraps automatically, sends the text to CGI script with newline chars included. N  N

HCI 201 Notes #5B20 Buttons - Use buttons to perform an action. - value is the text that appears on the button. - submit and reset do not require for name and value, but you can specify them as needed. By default, clicking on submit will send form data to the script. By default, clicking on reset will clear all the entered info. - Specify event attribute onClick=“DoTask()” to perform a pre-defined task when the button is clicked. (you can change the default behavior of submit and reset.) --- we will learn that in week #8.

HCI 201 Notes #5B21 Image fields (buttons) - Clicking on the image will perform an action. - src is the filename or URL of the inline image. - value assigns a value to the image (won’t show on the screen). - Use image fields to: - Give a fancy look to your buttons. - Perform tasks that regular buttons cannot: script can do different things depending on where the user clicked within the image. (name.x_coord, name.y_coord)

HCI 201 Notes #5B22 Hidden fields -Very very useful when you want to pass around information but do not want your readers to see that. -You can place the hidden field anywhere between. -A good practice is to put all hidden fields in one place, and add comments to describe the purposes of these fields. -Can be accessed and manipulated like any other form elements.

HCI 201 Notes #5B23 Additional form elements anything (text, image, HTML tags) you want to put on the button - type = button, submit, or reset. play music

HCI 201 Notes #5B24 Additional form elements Used for Home Business Government

HCI 201 Notes #5B25 Create effective forms Create an easy-to-follow information flow. Predictable format and position of the controls Group related fields Order the “tabindex” attribute in all the controls Structure a long form to scroll into several logical sections ( ). Form alignment with. Avoid horizontal scrolling. Help users input information correctly (limited choices, length, type, and validation) and easily (default values, retrieve profiles). Indicate the required fields. No ambiguous labels, appropriate instructions. Provide confirmation for successful submission, or feedback if there is any mistake.

HCI 201 Notes #5B26 Assignment 4 (due on 02/09/2005) Create an “index.htm” that has three frames: Header, LinkList, and Info. LinkList.htm has 3 links Home.htm (initially shown in Info.) Registration.htm (will display in Info.) Contact us (will open a new window) Header Link list Info Registration.htm has a form that contains: textbox, radio button, checkbox, dropdown menu, selection list (allow multiple selections), textarea, submit button, and reset button. What should be in Header.htm, Home.htm, and Contact.htm is up to you. Download “A4” from COL for detailed requirements.