2163

27
WEB PROGRAMMING WORSHOP SIKKIM MANIPAL UNIVERSITY Instructor: SANOH LAMINE [email protected]

description

HTML Forms

Transcript of 2163

  • WEB PROGRAMMING WORSHOP

    SIKKIM MANIPAL UNIVERSITY Instructor: SANOH LAMINE [email protected]

  • Introduction

    FORMS Provides two-way communication between a web server and a browser Provides dynamic content Instructor: SANOH LAMINE [email protected]

    *

  • HTML FORMSA Form basically contains boxes and buttons ExampleSearch enginesOn-line purchase of itemsRegistration

    It allows a user to fill up black entries and send it back to the owner of the page Called submit buttonInstructor: SANOH LAMINE [email protected]

    *

  • Example

    Instructor: SANOH LAMINE [email protected]

    *

  • Example

    Instructor: SANOH LAMINE [email protected]

    *

  • Form Tags and Attributes

    .

    Instructor: SANOH LAMINE [email protected]

    *

  • .

    Instructor: SANOH LAMINE [email protected] attributes which specify where and how to deliver filled-up information to the web server

    Two main attributes METHODACTION

    *

  • METHODInstructor: SANOH LAMINE [email protected] the information in the form will be sent tothe web server

    Information goes in two ways GET : all values are concatenated and sent POST : cause the content to be parsed one element to be parsed at a time.

    *

  • POST OR GETInstructor: SANOH LAMINE [email protected]

    POST is preferred method because of the stringsize limitation in most systems

    Notably, The File to accept this input is called asCGI

    *

  • ACTIONInstructor: SANOH LAMINE [email protected] specify the URL of a program on the originserver that will be receiving the form inputs.

    After execution, the program output will be sentback to the browser.

    *

  • Typical Usage Instructor: SANOH LAMINE [email protected]

    *

  • ExampleInstructor: SANOH LAMINE [email protected]
  • RECAP Client-ServerInstructor: SANOH LAMINE [email protected]

    *

  • Typical Usage Instructor: SANOH LAMINE [email protected]

    *

  • INPUT TagInstructor: SANOH LAMINE [email protected] a simple form elementTYPENAMESIZEMAXLENGHTVALUESRCALIGN

    *

  • TYPEInstructor: SANOH LAMINE [email protected] the type of element to be displayed

    TEXT: Defines a textbox

    RADIO: Defines a radio button

    CHECKBOX: Similar to radio button but each boxcan be selected independently

    *

  • TYPEInstructor: SANOH LAMINE [email protected]: Similar to text but characters arehidden

    HIDDEN: Takes fixed value, cannot be changed

    IMAGE: To import images and create image maps

    *

  • TYPEInstructor: SANOH LAMINE [email protected]: If clicked the from will be submitted to the destination CGI script

    RESET: clears a form content

    *

  • Other Attributes Instructor: SANOH LAMINE [email protected]: specifies a name for the input element

    SIZE: Number of characters that can be displayedin the input element

    MAXLENGHT: Defines the number of character itcan contain

    *

  • Other Attributes Instructor: SANOH LAMINE [email protected]: Used to specify the value of the input tag

    SRC: Used to specify a pointer to the image file

    ALIGN: Used to align the image file

    *

  • Instructor: SANOH LAMINE [email protected] can type multiple lines of text on like text type.

    Its attributes includes:NAME, VALUE, ROWS, COLS

    *

  • Instructor: SANOH LAMINE [email protected] along with OPTION

    Used to define selectable list of elements

    The list appears as scrollable menu or pop updepending on the browser

    Attributes are: Name, SIZE.

    *

  • Cont..Instructor: SANOH LAMINE [email protected]

    Attributes are:

    NAME: The name of the select

    SIZE: Specifies how many option will be displayedat a time

    *

  • Submitting FormInstructor: SANOH LAMINE [email protected]

    We can submit form in 3 ways Submit ButtonActive MapsPressing Enter

    *

  • PracticalInstructor: SANOH LAMINE [email protected]

    Creating a Registration Form

    *

  • HTML FormsInstructor: SANOH LAMINE [email protected]

    END OF HTML FORMS

    *

  • END OF HTML FORMS

    Next: Basics of PHP

    Further Questions: [email protected]

    THANK YOU!Instructor: SANOH LAMINE [email protected]

    *

    *

    *

    *

    *

    *

    *

    *

    *

    *

    *

    *

    *

    *

    *

    *

    *

    *

    *

    *

    *

    *

    *

    *

    *