JavaScript Forms Adding User Input.

Slides:



Advertisements
Similar presentations
Need to define two things: › The destination › Something to click on to get there  Tag is click here  Can be text, special character or image (next.
Advertisements

Ch3: Introduction to HTML5 part 2 Dr. Abdullah Almutairi ISC 340 Fall 2014.
Video, audio, embed, iframe, HTML Form
Forms Review. 2 Using Forms tag  Contains the form elements on a web page  Container tag tag  Configures a variety of form elements including text.
USER INTERACTIONS: FORMS
Tutorial 6 Forms Section A - Working with Forms in JavaScript.
HTML Tables and Forms Creating Web Pages with HTML CIS 133 Web Programming Concepts 1.
  Just another way to collect pieces together (like div, section)  Anything can be in there  Formatting just like all other elements.
Chapter 10 Form Basics Key Concepts Copyright © 2013 Terry Ann Morris, Ed.D 1.
Form Handling, Validation and Functions. Form Handling Forms are a graphical user interfaces (GUIs) that enables the interaction between users and servers.
Principles of Web Design 6 th Edition Chapter 11 – Web Forms.
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.
HTML Forms – Interactive HTML – Web 2.0. HTML – New types for input – Degrades gracefully for browsers that do not support the html 5 input types
1 Creating Web Forms in HTML Web forms collect information from customers Web forms include different control elements including: –Input boxes –Selection.
Neal Stublen Improvements  New form elements  Assist with validation  Consistency across sites  Changes reduce the need for common.
SERVER web page repository WEB PAGE instructions stores information and instructions BROWSER retrieves web page and follows instructions Server Web Server.
Week 10.  Form controls  Parent containing element for other form control elements  Requires method and action attributes to process the information.
CSC 2720 Building Web Applications HTML Forms. Introduction  HTML forms are used to collect user input.  The collected input is typically sent to a.
Website Development with PHP and MySQL Saving Data.
HTML Forms.
1 © Netskills Quality Internet Training, University of Newcastle HTML Forms © Netskills, Quality Internet Training, University of Newcastle Netskills is.
HTML - Forms By Joaquin Vila, Ph.D.. Form Tag The FORM tag specifies a fill-out form within an HTML document. More than one fill-out form can be in a.
Week 9 - Form Basics Key Concepts 1. 1.Describe common uses of forms on web pages 2.Create forms on web pages using the form, input, textarea, and select.
  Just another way to collect pieces together (like div, section)  Anything can be in there  Formatting just like all other elements  Always name.
XHTML & Forms. PHP and the WWW PHP and HTML forms – Forms are the main way users can interact with your PHP scrip Typical usage of the form tag in HTML.
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.
Button and Textbox. Input  Input objects are used to obtain input from the user viewing the webpage. They allow the user to interact with the Web. 
1 Form Elements  Form elements have properties: Text boxes, Password boxes, Checkboxes, Option(Radio) buttons, Submit, Reset, File, Hidden and Image.
Creating Web Page Forms. Introducing Web Forms Web forms collect information from users Web forms include different control elements including: –Input.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 7 TH EDITION Chapter 9 Key Concepts 1 Copyright © Terry Felke-Morris.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 9 Key Concepts 1 Copyright © Terry Felke-Morris.
Web Technologies Lecture 3 Web forms. HTML5 forms A component of a webpage that has form controls – Text fields – Buttons – Checkboxes – Range controls.
+ 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.
HTML Forms Chapter 9 pp Basic Form Join our list Name:
HTML Forms.
Week 10: HTML Forms HNDIT11062 – Web Development.
FORMS How to collect information f XX rom visitors Different kinds of form controls New HTML5 form controls.
JavaScript Functions. CSS Inheritance Which formatting applies? x y z input { display: block; } input.pref { background:red; } If you have a selector.
Department of Computer Science, Florida State University CGS 3066: Web Programming and Design Spring Forms, HTML5 layout.
Department of Computer Science, Florida State University CGS 3066: Web Programming and Design Spring Forms, HTML5 layout.
1 Web Engineering Forms Lecture 05. FORMS Its how HTML does interactivity. There are quite new feature in HTML5. But the fundamental idea does not change.
HTML Tutorial. What is HTML HTML is a markup language for describing web documents (web pages) HTML documents are described by HTML tags Each HTML tag.
HTML Elements: Forms and Controls Chapter 9 B. Ramamurthy.
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.
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,
Week-11 (Lecture-1) Introduction to HTML programming: A web based markup language for web. Ex.
2440: 141 Web Site Administration Web Forms Instructor: Joseph Nattey.
Advanced HTML Tags:.
>> Introduction to HTML: Forms
JavaScript functions.
Display Property.
HTML Forms CSC 102 Lecture.
Validation and Building Small Apps
Designing Forms Lesson 10.
Introducing Forms.
HTML Forms and User Input
Web Systems Development (CSC-215)
Web Development & Design Foundations with H T M L 5
Forms Data Entry and Capture
Forms, cont’d.
JavaScript Forms Adding User Input.
HTML5 Level II Session III
Session IV Chapter 10 – How to Work with Forms and Data Validation
Writing to a PAGE.
HTML5 - 2 Forms, Frames, Graphics.
Form Validation (with jQuery, HTML5, and CSS)
Session III Chapter 10 – How to Work with Forms and Data Validation
Web Forms.
Presentation transcript:

JavaScript Forms Adding User Input

Forms: Cubby holes in HTML Remember that we need a place to get information and put it Rather than variables, we can get and put data in forms Lets users give input and let’s us return new values Today, we read; Thursday, we write

Input Forms

User Input: Forms <form name=“formname”> Just another way to collect pieces together (like div, section) Anything can be in there Formatting just like all other elements Always name forms

User input We’d like to let users give us information Request input <input type="text" name="name"> Lots of types Use name to identify the element

Naming Elements Reference value through CONTEXT: <form name=“form-name”> <input type=“text” name=“field-name”> </form> Reference value through CONTEXT: form-name.field-name.value

Retrieving the value form-name.field-name.value Note that the first 2 parts of this are just normal selector notation (like you use in css) The .value is to be used exactly and says to use that tag’s value (Note this is only the first and simplest way to access information)

Input attributes

Labeling Elements <form name=“fname”> <label> Label: <input type=“text”> </label> </form> No formatting, but accessibility gains

Default Values <form name=“fname”> <label> Label: <input type=“text” value=“COMP”> </label> </form> Sets default value, but can be changed

Hint Text Gives text but never passed as value <form name=“fname”> <label> Label: <input type=“text” placeholder=“department”> </label> </form> Gives text but never passed as value

Other Input Types

Many Element Types Button color date datetime datetime-local email file image month number password radio range  reset search tel text time  url week