RaysWebClass.Com |
Name: City: State:
Sign Me Up!Note: If the user checks the box, the following line will be sent to the next web page:
Sign Me Up!
CashNote: Because radio buttons act like a single object, they all have the same name ("Payment").
Net 10 Days
Charge
CashUsing the Lable Tag:
Net 10 Days
Charge
Comments:
State:Note that Louisiana appears in the select box first. Take a closer look at the option for Louisiana. It has an added attribute selected. This attribute will make Louisiana the default choice. The following line will be sent to the next web page:
States visited:Hold down the Ctrl Key to select more than one.
Click Start → Computer Double Click Local Disk (C:)
Double Click inetpub and wwwroot
Right Click in the wwwroot and choose New → Text Document
Double click the New Text Document.txt and Enter the following code:<!DOCTYPE html>Save it, close it, Right Click and Rename it echo.asp.
<html lang='en'>
<head>
<title>Echo</title>
</head>
<body bgcolor='cornflowerblue'>
<font size='3' family='verdana'>
<!-- * * * * * * * -->
<!-- * Echo.asp * -->
<!-- * * * * * * * -->
<%
Dim Item
For Each Item in Request.Form
Response.Write Item & " = "
Response.Write Request.Form( Item ) & "<br>"
Next
%>
<br><br>
<input type='button' value=' « Return'
onClick='history.back();'>
</font>
</body>
</html>
Now let's finish the Contact Us page with a form for visitors to fill out:
Replace ~under construction~ with the following:
<form method='post' action='http://localhost/echo.asp'>
<table>
<tr>
<td align='right'> Your Name: </td>
<td> <input type='text' name='Name'> </td>
</tr>
<tr>
<td align='right'> E-mail Address: </td>
<td> <input type='text' name='Email'> </td>
</tr>
<tr>
<td align='right' valign='top'> Questions/Comments: </td>
<td> <textarea cols='45' rows='8' name='Comments'></textarea> </td>
</tr>
<tr>
<td align='right'> <input type='submit' value=' Send '> </td>
<td> <input type='reset' value=' Clear '> </td>
</tr>
</table>
</form>
Try it! The information you enter here will be displayed on the echo.asp Web page.
Try adding a checkbox, radio buttons, a select list of states with Louisiana as the default.