Top Banner
Unit 11 – Forms Presentation 1 Web Programming
18

M02 un11 p01

Jan 20, 2015

Download

Technology

Intan Jameel

 
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: M02 un11 p01

Unit 11 – Forms

Presentation 1

Web Programming

Page 2: M02 un11 p01

Revision

1. Define Frame.

2. Name the different types of Framesets.

3. Write the code segment to create a Web page with 2 vertical frames.

4. Write the code segment to create a Web page with mixed frameset.

5. Write the code segment to create a Web page with Inline Frame.

Page 3: M02 un11 p01

Objectives

At the end of this presentation, you will be able to• Add a Form to your Web page• Add a Text Field to a Form• Add a Radio Button to a Form• Add a Text Area to a Form

Page 4: M02 un11 p01

Forms

• Forms are a collection of controls.• It allows to get input from user.• Its like a container having elements called

controls.• A Form is added to a Web page using the

<FORM> tag.

Page 5: M02 un11 p01

Hands-On!

• Open the HTML file Form.HTML in IE.• This HTML document illustrates the use of

forms in a Web page.

Text Box

Radio Button

Text Area

Check Box

Drop-Down List Box

Button

Page 6: M02 un11 p01

Form Attributes

• The <FORM> tag attributes are Action and Method.

• The URL of the program file that processes the data entered by the user is assigned to the Action attribute.

• Method attribute is used to specify how the information is to be sent to the URL.

Page 7: M02 un11 p01

Activity 2.11.1

• Draw a form to enter your personal details (Bio-Data).

Page 8: M02 un11 p01

Working with Form Elements

• Controls can be added to the form using the <INPUT> tag along with Type attribute.

• Type attribute is used to specify the type of the control.• Name attribute is used to specify a name for the field.

Page 9: M02 un11 p01

Text Field

• The Text Field is a control.• Used to get a text from the user and to

display a text to the user. • <INPUT> tag is used to add text field. • The attribute Type = “Text” instructs the

browser to display a Text Field. • Text Field Attributes are given in Table.

Page 10: M02 un11 p01

Radio Button

• Its used to display an option to the user.• Two or more Radio Buttons can be grouped together.• <INPUT> tag is used to add text field.• Radio Button Attributes are given in Table.

Page 11: M02 un11 p01

Text Area

• Used to get a text from the user and to display a text to the user.

• Text Area can accept or display more than one line of text. • <TEXTAREA> tag is used to add textarea field.

Page 12: M02 un11 p01

Text Area Contd.

• The attributes of the <TEXTAREA> tag are given in Table.

Page 13: M02 un11 p01

Lab Exercise

1. Open D11_1.html in Internet Explorer.

a. Name attributes which are used in input tag.

b. Identify the attribute which is used to specify the input type.

c. Identify the attribute which is used to set the length of the text box.

Page 14: M02 un11 p01

Lab Exercise Contd.

d. Observe the difference between size and maxlength.

e. Identify the tag which is allows to enter the multiline text entry.

f. Name the attribute which are used in textarea.

Page 15: M02 un11 p01

Lab Exercise

2. Open D11_1.html in Internet Explorer.

a. View the source code in the Notepad.

b. Increase the size of the Name textbox to 10.

c. Insert value into Name textbox and observe the difference.

d. Change the Password textbox type to password.

Page 16: M02 un11 p01

Lab Exercise Contd.

e. Increase the no of columns of the textarea to 40.f. Decrease the no of row of the textarea to 3.

Page 17: M02 un11 p01

Summary

In this presentation, you learnt the following:• The Form is like a container containing

elements called controls. • Text Field, Check box, Radio button, Text

area and Drop-down List box are some of the controls used to get data from the user.

• The <FORM> tag has two important attributes namely, Action and Method.

Page 18: M02 un11 p01

Assignment

1. Mention the use of Action and Method attributes of <FORM> tag.

2. Name attributes which are use in <TEXTAREA> tag.