4-Web forms and html (lect 5) php


Published on

Published in: Education, Technology, Design
  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

4-Web forms and html (lect 5) php

  1. 1. Web Forms and HTML Lecture 5
  2. 2. <textarea> The textarea element is straight-forward, having just one simple state. It works something like a big text-type input element, but is used for bigger chunks of textual data, usually with multiple lines. For Example:  An address,  A comment on a feedback form. Unlike the input element, textarea has an opening and closing tag. Any text in between the opening and closing tag makes up the initial value of the element. <textarea name=”whatever” rows=”10” cols=”20”> Type something here </textarea>
  3. 3. <select> Select form fields present the user with a list (which is usually displayed as a drop-down menu), from which one or more options can be selected. Key to their operation, another element is needed—the option element, which defines each option in the list. <select name=”book”> <option selected=“selected”>The Trial</option> <option>The Outsider</option> <option>Things Fall Apart</option> <option>Animal Farm</option> </select> You can supply different values for each option element by using the value attribute inside the opening option tag. When the value attribute is present, its value will be sent instead of the option element’s content. You can set one option element to be initially selected by using the selected attribute (in the form of selected=”selected”).
  4. 4. Input Types Input Type “Hidden” If you will want to pass information between pages without the user seeing it. Hidden form controls remain part of any form, but the user cannot see them in the Web browser. They should not be used for any sensitive information you do not want the user to see because the user could see this data if looked in the source of the page. Example: <input type=“hidden” name=“h1” value=“this is hidden field”/>
  5. 5. DIV The <div> tag defines a division or a section in an HTML document. The <div> tag is used to group block-elements to format them with CSS. Supports all Global Attributes like, id, class, style, etc Example: <div> <h3>This is a heading</h3> <p>This is a paragraph.</p> </div>
  6. 6. SPAN The <span> tag is used to group inline-elements in a document. The <span> tag provides no visual change by itself. Supports all Global Attributes like, id, class, style, etc Example: <p>My Pet has <span style="color:blue">blue</span> eyes.</p>
  7. 7. Assignments 1. Generate Form Controls Dynamically a. Create Page1 with Form consisting of Textfield - getting no: textfields to show on Page2 and a Submit Button. b. Create a Page2 consisting of : No: of i. 1 textfield (name) ii. 2 radio buttons (Gender-Male & Female) iii. 1 select For Country given from page1 in tablular format row wise. 1. Create a Page3 consisting of : Values Given Through Form Controls on page2 in tablular format.
  8. 8. Assignments 2. Convert Marksheet Assigment 1. Extend you marksheet assignment by giving all subjects marks using textfield on page 1 and show the result as in previous marksheet assignment. 3. Create Calculator using Form 1. Create a Page1 consisting of : 2. 4 text Fields 1. Value1 i. Value2 ii. Operator iii. Result a. Submit/Calculate Button. Note: The Result Should be shown in result textfield after submit/calculate
  9. 9. Questions?
  10. 10. Questions?