We think you have liked this presentation. If you wish to download it, please recommend it to your friends in any social system. Share buttons are a little bit lower. Thank you!
Presentation is loading. Please wait.
Published byConnor Mooney
Modified over 3 years ago
Copyright © 2003 Pearson Education, Inc. Slide 7-1 Created by Cheryl M. Hughes The Web Wizards Guide to XML by Cheryl M. Hughes
Copyright © 2003 Pearson Education, Inc. Slide 7-2 CHAPTER 7 XHTML Forms
Copyright © 2003 Pearson Education, Inc. Slide 7-3 Overview of XHTML Forms Web forms give Website owners the ability to receive information from their users or to allow users to personalize the Website A Web form can contain many types of input elements: Text boxes Password boxes Buttons Checkboxes Pull-down menus 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 users 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
Copyright © 2003 Pearson Education, Inc. Slide 7-4 The Element The - element contains all of the input elements of the form Attributes: action – This attribute is required and provides the path to the program that will process the form data when the user submits the form Examples: method – This attribute tells the web server how to process the data Values: Get – This is the default value and will automatically assign this value if the method attribute is not present in the element. This method appends the form input data to the end of a URL. The following two start tags are the same: post – This value tells the processing program to send the form data to the server as regular input data. Nothing will be appended to the URL
Copyright © 2003 Pearson Education, Inc. Slide 7-5 Text Input Elements Text input elements: There are three types of text input elements which are empty elements: 1. Text: - Allows users to enter text 2. Password: - Allows users to enter text which is not visible to others. The characters are entered and appear only as the * character. WARNING: even though the value is hidden while it is being typed, the value is sent to the server in text form 3. File: - Allows users to Browse their computer in order to send a file to the Web server The following attributes can be used with text input elements: maxlength - Maximum number of characters allowed for input name - Used to identify the input field size - Defines the size of the input field in characters. If this is smaller than the maxlength attribute, the field will scroll. type - Defines the type of input (text, password, or file for text input fields) disabled - Disables the field for user input. The value of a disabled field will not be sent to the processing program readonly - Makes the content of the text field unchangable. The value of this field will be sent to the processing program value - Sets a default value onselect - For use with scripts. An event handle that specifies an action to be performed when the field is selected onchange - For use with scripts. An event handle that specifies an action to be performed when the content of the field has been changed
Copyright © 2003 Pearson Education, Inc. Slide 7-6 The Element The element provides a multi-line text entry box for users to enter larger amounts of data than using an element Data that is contained between the start tag and the ending tag will appear in the textbox as the default value The following attributes can be used with : name - Used to identify the input field rows - Number of horizontal rows of the text area cols - Number of vertical columns of the text area readonly - Makes the content of the text area unchangable disabled- Disables the field for user input. The value of a disabled field will not be sent to the processing program. readonly - Makes the content of the text field unchangable. The value of this field will be sent to the processing program. onselect - For use with scripts. An event handle that specifies an action to be performed when the field is selected. onchange - For use with scripts. An event handle that specifies an action to be performed when the content of the field has been changed
Copyright © 2003 Pearson Education, Inc. Slide 7-7 Selection Form Elements The selection form elements allow the user to select one or many choices from a list There are 3 types of selection elements: Checkboxes: Radio buttons: Drop-down lists: … Using selection elements: Checkboxes - used for lists where the user can choose one or more selections from a list of options. Each item in a checkbox group can be checked or unchecked. Radio Buttons – used for lists which allow the user to choose only one item in the list Drop-down lists - The list appears in a scrollable box. These are usually used for long lists of items. Each item is listed in a separate element
Copyright © 2003 Pearson Education, Inc. Slide 7-8 Completing the Form Once a user has completed the form, the data must be sent to the server to be processed The XHTML language provides a means to submit the form using the program that is specified in the action attribute of the element by assigning the value of submit to the type attribute for the element: XHTML also gives users an ability to clear the form and reset the default values by assigning the value of reset to the type attribute for the element: The value attribute can be set to assign names to either of these buttons. If no value is set, then the computer will assign default text
Copyright © 2003 Pearson Education, Inc. Slide 7-9 Form Example – XHTML code (pg. 1) 1 2 4 5 6 Account Application 7 8 9 10 Account Application 11 12 13 14 15 Please enter your name: 16 17 18 Enter your password: 19 20 21 Enter your password again to verify: 22 23 24 Please select the accounts you currently have: Open element Text box input field Password box input field
Copyright © 2003 Pearson Education, Inc. Slide 7-10 Form Example – XHTML code (pg. 2) 25 Checking 26 Savings 27 Brokerage 28 Retirement 29 30 31 Are you employed? 32 Yes 33 No 34 35 Choose the branch office closest to where you live: 36 37 38 Braintree 39 Cambridge 40 Dedham 41 Foxboro 42 Hingham 43 Marlborough 44 Weymouth 45 46 47 Please provide any additional information: 48 49 50 52 53 54 55 56 57 Checkbox group for accounts } Radio group for emp } Select (drop- down) group for branch } Textarea input box Submit button Form Reset button End of form
Copyright © 2003 Pearson Education, Inc. Slide 7-11 Form Example – Web Browser
Copyright © 2012, Elsevier Inc. All rights Reserved. 1 Chapter 7 Modeling Structure with Blocks.
2011年上半年 我院团学工作活动图片展播 2011年8月28日.
PP Test Review Sections 6-1 to 6-6
Chapter 12 Working with Forms Principles of Web Design, 4 th Edition.
Copyright © 2003 Pearson Education, Inc. Slide 1 Computer Systems Organization & Architecture Chapters 8-12 John D. Carpinelli.
Copyright © Action Works 2008 All Rights Reserved - Photos by David D
Break Time Remaining 10:00.
Physics for Scientists & Engineers, 3rd Edition
Development of renewable energy sources in Germany in 2011
Time for a BREAK! You have 45 Minutes.
Clock will move after 1 minute
David Burdett May 11, 2004 Package Binding for WS CDL.
AP STUDY SESSION 2.
1 hi at no doifpi me be go we of at be do go hi if me no of pi we Inorder Traversal Inorder traversal. n Visit the left subtree. n Visit the node. n Visit.
Select a time to count down from the clock above
Local Customization Chapter 2. Local Customization 2-2 Objectives Customization Considerations Types of Data Elements Location for Locally Defined Data.
Adding Up In Chunks.
Budapest University of Technology and Economics, BME , 1872
Solving a Sudoku Puzzle
Chapter 11 Creating Framed Layouts Principles of Web Design, 4 th Edition.
MaK_Full ahead loaded 1 Alarm Page Directory (F11)
Copyright Tim Morris/St Stephen's School
EIS Bridge Tool and Staging Tables September 1, 2009 Instructor: Way Poteat Slide: 1.
1.step PMIT start + initial project data input Concept Concept.
: 3 00.
Converting a Fraction to %
1 Advanced Tools for Account Searches and Portfolios Dawn Gamache Cindy Bylander.
Process a Customer Chapter 2. Process a Customer 2-2 Objectives Understand what defines a Customer Learn how to check for an existing Customer Learn how.
Essential Cell Biology
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 2 Introduction to XHTML Programming the World Wide Web Fourth edition.
Exarte Bezoek aan de Mediacampus Bachelor in de grafische en digitale media April 2014.
Peterson’s Practice AP Exam
Copyright © 2011, Elsevier Inc. All rights reserved. Chapter 6 Author: Julia Richards and R. Scott Hawley.
Custom Statutory Programs Chapter 3. Customary Statutory Programs and Titles 3-2 Objectives Add Local Statutory Programs Create Customer Application For.
Numbers Treasure Hunt Following each question, click on the answer. If correct, the next page will load with a graphic first – these can be used to check.
Copyright I/O International, 2013 Visit us at: A Feature Within from Item Class User Friendly Maintenance Copyright.
Types of selection structures
© Copyright by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Outline 24.1 Test-Driving the Ticket Information Application.
1 A B C
Office 2003 Introductory Concepts and Techniques M i c r o s o f t Office 2003 Integration Integrating Office 2003 Applications and the World Wide Web.
1 Click here to End Presentation Software: Installation and Updates Internet Download CD release NACIS Updates.
© 2017 SlidePlayer.com Inc. All rights reserved.