16/19/2015CS120 The Information Era CS120 The Information Era Chapter 5 – Advanced HTML TOPICS: Introduction to Web Page Forms and Introductory Javascript.

Slides:



Advertisements
Similar presentations
Video, audio, embed, iframe, HTML Form
Advertisements

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.
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.
Personal Independent Networking Project HTML Forms by Chris Smith.
1 CS101 Introduction to Computing Lecture 12 Interactive Forms (Web Development Lecture 4)
Tutorial 6 Forms Section A - Working with Forms in JavaScript.
Web Development & Design Foundations with XHTML Chapter 9 Key Concepts.
Chapter 10 Form Basics Key Concepts Copyright © 2013 Terry Ann Morris, Ed.D 1.
Interactive Form 1 Edited By; L.Maha AlAjmi. Revision 2 We learnt how to extend our Web pages by adding a few more tags Specifically, we discussed various.
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.
Tutorial #9 – Creating Forms. Tutorial #8 Review – Tables Borders (table, gridlines), Border-collapse: collapse; empty-cells: show; and rowspan, colspan.
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.
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.
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.
1 VU. 2 CS101 Introduction to Computing Lecture 15 More on Interactive Forms (Web Development Lecture 5)
CSC 2720 Building Web Applications HTML Forms. Introduction  HTML forms are used to collect user input.  The collected input is typically sent to a.
 2003 Prentice Hall, Inc. All rights reserved. CHAPTER 3 JavaScript 1.
HTML Forms. Today’s Lecture We will try to understand the utility of forms on Web pages We will find out about the various components that are used in.
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.
JavaScript. During the last lecture We looked at the utility of forms on Web pages We found out about the various components that are used in a form We.
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.
HTML Forms. Today’s Lecture We will try to understand the utility of forms on Web pages We will find out about the various components that are used in.
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.
HTML FORMS GET/POST METHODS. HTML FORMS HTML Forms HTML forms are used to pass data to a server. A form can contain input elements like text fields, checkboxes,
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. 
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.
JavaScript Introduction.  JavaScript is a scripting language  A scripting language is a lightweight programming language  A JavaScript can be inserted.
SYST Web Technologies SYST Web Technologies XHTML Forms.
Copyright © Terry Felke-Morris WEB DEVELOPMENT & DESIGN FOUNDATIONS WITH HTML5 Chapter 9 Key Concepts 1 Copyright © Terry Felke-Morris.
+ 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 The TEXT Object Presented By: Ankit Gupta.
Creating Web Page Forms COE 201- Computer Proficiency.
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.
JavaScript JavaScript is a programming language that web browsers understand. You can use it to make your web pages interactive by: Responding to user.
Web Forms. Web Forms: A form allows our web visitors to submit information to us. Some examples uses for forms are to let the web user contact us, fill.
HTML Structure II (Form) WEEK 2.2. Contents Table Form.
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,
FORMS Explained By: Jasdeep Kaur. Lecturer, Department of Computer Application, PGG.C.G., Sector: 42, Chandigarh.
Informatics Computer School CS114 Web Publishing HTML Lesson 4.
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.
Client-Side Internet and Web Programming
How to Write Web Forms By Mimi Opkins.
Forms Web Design Ms. Olifer.
FORMS Explained By: Sarbjit Kaur.
ITE 115 Creating Web Page Forms
HTML/XHTML Forms 18-Sep-18.
Designing Forms Lesson 10.
Creating Form Elements
Web Development & Design Foundations with H T M L 5
Forms Data Entry and Capture
CNIT 131 HTML5 - Forms.
Focus of the last lecture was on HTML Lists & Tables
Creating Forms on a Web Page
Intro to Forms HTML forms are used to gather information from end-users. A form can contain elements like radio-buttons, text fields, checkboxes, submit.
HTML Forms 18-Apr-19.
Intro to Forms HTML forms are used to gather information from end-users. A form can contain elements like radio-buttons, text fields, checkboxes, submit.
© Hugh McCabe 2000 Web Authoring Lecture 8
Lesson 6: Web Forms.
Making your HTML Page Interactive
Unit 5 Create Forms.
Presentation transcript:

16/19/2015CS120 The Information Era CS120 The Information Era Chapter 5 – Advanced HTML TOPICS: Introduction to Web Page Forms and Introductory Javascript

26/19/2015CS120 The Information Era Forms  Web pages are usually there only to be read.  But sometimes, you might want to obtain and process information provided by the user.  We do this using forms:  Now, we’ll concentrate on obtaining information using forms.  Later, we’ll learn how to process the information obtained from the forms using PERL and CGI Scripts.

36/19/2015CS120 The Information Era Form Examples  This is what a few different types of forms look like on a web page:  Today we’ll learn how to set up all of the different types of forms.

46/19/2015CS120 The Information Era Types of Forms  Simple forms  Multiple lines of input  Password forms  Multiple elements  Check boxes  Radio button  Pop up list  Reset values Experiment with these at : (NOTE: Processing of these forms is not set up.)

56/19/2015CS120 The Information Era Simple Forms <INPUT TYPE="text" NAME="name" SIZE=20 VALUE="Your name"> NOTES:  TYPE=“text” and SIZE=20 gives a textbox of width 20 characters.  VALUE=“Your name” is what is placed in the textbox by default.  NAME=“name” sets the variable “name” that our CGI script will use to store and process the information typed in the textbox.  With ACTION=“URL” we will specify the URL of our CGI script on euler; we’ll talk more about this later.  With METHOD=GET we are specifying how the data gets sent to the CGI script. The other option is METHOD=POST, but we’ll also talk more about this later.

66/19/2015CS120 The Information Era Multiple lines of input My thoughts so far are:

76/19/2015CS120 The Information Era Password Forms Enter PIN Number NOTES:  TYPE=“password” will hide the characters as they are typed.  NAME=“Password” is the variable our CGI script will use to process the information.

86/19/2015CS120 The Information Era Multiple elements

96/19/2015CS120 The Information Era Radio Buttons Male Female NOTES:  Use Radio Buttons if exactly one of several options is to be selected.

106/19/2015CS120 The Information Era Radio buttons Age <18 <INPUT TYPE="radio" NAME="age" VALUE="b" CHECKED> NOTES:  Including CHECKED in the attributes places a default selection next to the choice.

116/19/2015CS120 The Information Era Check Boxes Use <INPUT TYPE="checkbox" NAME="use" VALUE="Ada 95" CHECKED>Ada 95 <INPUT TYPE="checkbox" NAME="use" VALUE="C++" CHECKED>C++ <INPUT TYPE="checkbox" NAME="use" VALUE="COBOL">COBOL <INPUT TYPE="submit" NAME="button" VALUE="Send"> NOTES:  Use TYPE=“Checkbox” if any number of options can be selected.  Including CHECKED in the attributes places a default check next to the choice.

126/19/2015CS120 The Information Era Pop up list Media used is Disk Floppy disk DAT tape

136/19/2015CS120 The Information Era Reset values I like to drink: <INPUT TYPE="checkbox" NAME="Like" VALUE="Coffee">Coffee <INPUT TYPE="checkbox" NAME="Like" VALUE="Tea">Tea <INPUT TYPE="submit" NAME="button” VALUE="Send"> NOTES:  TYPE=“reset” VALUE=“Reset” will reset all selections in the form to their defaults.

146/19/2015CS120 The Information Era Problem Create the form found at:

156/19/2015CS120 The Information Era Javascript  Javascript is an easy-to-use programming language that can be embedded in the header of your web pages.  Javascript can enhance the dynamics and interactive features of your page by allowing you to perform calculations, check forms, write interactive games, add special effects, customize graphics selections, create security passwords and more.

166/19/2015CS120 The Information Era Javascript  The first thing you need is to write the javascript.  This is placed in the head tag. <!-- Beginning of JavaScript – function HelloWorld() { alert ("Hello World!"); } // - End of JavaScript - -->

176/19/2015CS120 The Information Era Javascript  The next thing that you need to do is call the javascript that you created.  You do this by placing a call in the body of your html. Hello

186/19/2015CS120 The Information Era Javascript  One thing you must know and remember: Javascript is CASE SENSITIVE.

196/19/2015CS120 The Information Era Try It Out <!-- Beginning of JavaScript – function HelloWorld() { alert ("Hello World!"); } // - End of JavaScript - --> Hello

206/19/2015CS120 The Information Era Variables  Let's suppose x=5.  x is a variable.  At the time of the statement, x happens to be 5.  Can x be something else?  Sure, x=6.  Now x equals 6.  (Hence the name "variable"... it's value can vary.)

216/19/2015CS120 The Information Era Variable Example <!-- Beginning of JavaScript – function HelloWorld() { myname = "Joe"; alert (myname); } // - End of JavaScript - --> Hello

226/19/2015CS120 The Information Era Question  Can you make the message box display Hello, and the name?

236/19/2015CS120 The Information Era Getting Information  We can get the information from the user and have the message box display the word “hello” and the user name.  We do this by creating a text box where the user can enter their name.  Then we create a button that the user can click.  By clicking on that button, the Javascript function is called, and the message box is displayed.

246/19/2015CS120 The Information Era Another Example

256/19/2015CS120 The Information Era JavaScript <!-- Beginning of JavaScript - function MsgBox (myname) { alert ("Hello " + myname) } // - End of JavaScript - -->

266/19/2015CS120 The Information Era Another Example

276/19/2015CS120 The Information Era HTML

286/19/2015CS120 The Information Era Javascript  We can improve the HTML by adding some Javascript. <!-- Beginning of JavaScript - function changecolor(code) { document.bgColor=code} // - End of JavaScript - -->  Then the HTML code will change to: etc.