Interactive Forms in Web Development: An Introduction to JavaScript, Slides of Introduction to Computing

In this lecture from the cs101 introduction to computing course, students learn how to add more interactivity to forms using javascript. The basics of form tags, various input types, and the role of client-side scripts in form validation. Students will also explore the advantages and disadvantages of client-side scripting.

Typology: Slides

2011/2012

Uploaded on 11/03/2012

banamala
banamala 🇮🇳

4.4

(19)

114 documents

1 / 52

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
CS101 Introduction to Computing
Lecture 15
More on Interactive Forms
(Web Development Lecture 5)
1
Docsity.com
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34

Partial preview of the text

Download Interactive Forms in Web Development: An Introduction to JavaScript and more Slides Introduction to Computing in PDF only on Docsity!

CS101 Introduction to Computing

Lecture 15

More on Interactive Forms

(Web Development Lecture 5)

Focus of the last lecture was on Interactive Forms

  • We looked at the utility of forms on Web pages
  • We found out about the various components that are used in a form
  • We became able to build a simple, interactive form

But first lets review the tags that are

used in forms

<FORM

name=“name” method=“get” or “post” action=“URL”

Elements of the form

Password Input Field

<INPUT

type=“password” name=“name” size=“widthInCharacters” maxlength=“limitInCharacters” value=“initialDefaultValue”

Hidden Input

<INPUT

type=“hidden” name=“name” value=“value”

Radio Button Input Element

<INPUT

type=“radio” name=“name” checked value=“selectedValue”

File Upload Input Element

<INPUT

type=“file” name=“name” value=“nameOfSelectedFile” enctype=“fileEncodingType”

Submit Button Input

<INPUT

type=“submit” name=“name” value=“buttonLabel”

8 Possible Values for the “type” Attribute

of tag

  1. text
  2. password
  3. hidden
  4. checkbox
  5. radio
  6. file
  7. reset
  8. submit

Select from a (Drop Down) List

<SELECT name=“name” size=“numberOfDisplayedChoices” multiple

End of the Review of Tags Used in Forms

Now let’s take a look at a form that we constructed last time, and see how we can make it better