tynation.com

Tuesday, May 17, 2011

CS110

Today we're learning about using forms. Too bad I don't know any server side scripting, but it is good to actually understand this stuff


Lab


What is the purpose?


In this lab, you will practice building forms.


What are the steps?


• Task 1:


Procedure:


1. Write the XHTML to create a text box named username that will be used to accept the user name of Web page visitors. The text box should allow a maximum of 30 characters to be entered.


2. Demonstrate your code in a Web page.


• Task 2:


Procedure:


1. Write the XHTML to create a group of radio buttons that Web site visitors can check to vote for their favorite day of the week.


2. Demonstrate your code in a Web page.


• Task 3:


Procedure:


1. Write the XHTML to create a select list that asks Web site visitors to select their favorite social networking Web site.


2. Demonstrate your code in a Web page.


• Task 4:


Procedure:


1. Write the XHTML to create a fieldset and legend with the text “Shipping Address” around the following form controls: AddressLine1, AddressLine2, City, State, ZIP


2. Demonstrate your code in a Web page.


• Task 5:


Procedure:


1. Write the XHTML to configure an image called signup.gif as an image button on a form.


2. Demonstrate your code in a Web page.


• Task 6:


Procedure:


1. Write the XHTML to configure a hidden form control with the name of userid.


2. Demonstrate your code in a Web page.


Homework



  1. Use type="___________" to configure a button to automatically replace the default values in the fields on a form. Answer: reset

  2. What form element is appropriate for an area that your visitors can use to type in comments about your Web site?

  3. To treat radio buttons as a group, use the same value for the ________ attribute.

  4. What XHTML attribute specifies the name and location of the script invoked to process the form values?

  5. What is the default value for the XHTML method attribute?

  6. Use type="_________" to cause a form element to pass its value to the server without displaying in the browser.

  7. What form element is appropriate to use when conducting a survey such as asking visitors to vote for their favorite search engine?

  8. What XHTML attribute limits the number of characters a text box will accept?

  9. What XHTML element associates a text description with a form element

  10. What is the term for a protocol for a Web server to pass a Web page’s request to an application program or script?

  11. Use type="__________" to automatically send the form data to the location on the action attribute when a button is pressed.

  12. What XHTML attribute assigns a "hot" key to a form element?

  13. What form element is appropriate to use when conducting a survey and asking visitors to indicate their favorite browsers?

  14. What form element do you use when you want to conserve screen space but have a list of options to display to your visitors?

  15. What XHTML element describes the choices available in a select list?

Posting the lab and homework here so I can look over them later. Plan on enjoying my birthday tonight


-Ty

No comments: