|
Web Design ![]() This website demonstrates using wikis as teaching and learning tool. The course instructor is happy to share the teaching materials here with those who find it readable. |
Tutorial /
Web Form BasicsOverview: This tutorial gives you some activities to learn more about Web forms, as well as interaction between browser and Web server in the processing of Web form inputs.
Activity 1: A Simple Web Form in HTML code
(Q1) Send the portion of HTML code that contains the form to Steven.
Activity 2: A Simple Form Processor with GET method
<?php print_r($_REQUEST); ?>
(Q2) What is the URL after you submit the form?
(Q3) What the script processor.php can get from the request sent by the browser?
(Q4) How Chinese characters are encoded in the URL after you submit the form?
(Q5) Do a little research to find the maximum length of the URL that the Web server can handle.
(Q6) What error code your Web browser will receive when "the requested URL's length exceeds the capacity limit for this server"?
Activity 3: A Simple Form Processor with POST method
(Q7) What is the URL after you submit the form?
(Q8) What are the advantages of POST method as compared to GET method in Web forms?
(Q9) Which method you should use when the form contains a password input?
Activity 3: Check Box, Radio Box and Drop-down Selection
(Q10) What has been submitted to the server via the Web form?
(Q11) What is the major difference between check boxes and raido boxes in a Web form?
(Q12) What will happen if your browser sends two or more name-value pairs with the same name attribute to the processor.php?
(Q13) When should we use the same name attribute in two or more inputs of the Web form?
Activity 4: Form Validation with JavaScriptReference: http://www.elated.com/articles/form-validation-with-javascript/ (Q14) What are the two main methods for validating Web forms?
(Q15) In validating Web form with JavaScript, What is the additional attribute you need to use in the <form> tag?
(Q16) How do you skip the form validation with JavaScript?
|