home *** CD-ROM | disk | FTP | other *** search
- <%
- '////////////////////////////////////////////////////////////////////
- '// //
- '// NetObjects ScriptBuilder ASP Samples //
- '// Sample : Handling data from forms using //
- '// the Request collection //
- '////////////////////////////////////////////////////////////////////
-
- ' DESCRIPTION: This sample shows how to use the Request collection
- ' to get information from a posted form.
- %>
-
- <HTML>
- <HEAD><TITLE>Form Sample</TITLE></HEAD>
-
- <%
- If Request.Form("isFormFilled") = "" Then
-
- ' This part of the script allows a person
- ' to enter data on an HTML form.
- %>
-
- <BODY BGCOLOR=#FFFFFF>
- <H3>Form Sample</H3>
- <HR>
-
-
- <P>This sample shows how to use the Request collection
- to get information from a posted form.
- <FORM METHOD=POST ACTION="form.asp">
-
- <P>Your Name:
-
- <P><INPUT TYPE=TEXT SIZE=50 MAXLENGTH=50 NAME="name"><BR>
-
- <P>Background color you like:
- <SELECT NAME="bgColor" SIZE=3>
- <OPTION SELECTED> white
- <OPTION> red
- <OPTION> blue
- </SELECT>
-
- <INPUT TYPE=HIDDEN NAME="isFormFilled" VALUE="yes" ><BR>
-
- <P>Why do you like this color?
-
- <P><TEXTAREA NAME="describe" ROWS=5 COLS=35></TEXTAREA><BR>
-
- <P><INPUT TYPE=SUBMIT VALUE="Submit Form"><INPUT TYPE=RESET VALUE="Reset Form">
- </FORM>
-
-
- <% Else
-
- ' This part of the script shows a person
- ' what was selected.
- %>
-
- <%= "<BODY BGCOLOR=" + Request.Form("bgColor") + ">" %>
-
- <P>Your name is <B><%= Request.Form("name") %></B>
-
- <P>The reason why you like <%= Request.Form("bgColor") %> is:
- <B><I><%= Request.Form("describe") %></B></I>
-
- <% End If %>
-
- <BR>
- <BR>
- </BODY>
- </HTML>
-
-