- From: Mark I. Lubin <mil@phys.physics.ucf.edu>
- Date: Sun, 7 Jul 1996 23:54:13 -0500
- To: abaird@w3.org
- Cc: www-jigsaw@w3.org
This form <STRONG>Please take a minute and complete the form about Jigsaw</STRONG> <FORM METHOD="POST" ACTION="http://cmt.physics.ucf.edu:9999/User/survey"> Name: <INPUT NAME="name" SIZE=50><BR> Email Address: <INPUT NAME="email" SIZE=50><BR> <INPUT NAME="subject" TYPE="hidden" VALUE="COMMENTS"><P> Type whatever you wish about Jigsaw:<P> <TEXTAREA NAME="content" ROWS=10 COLS=60></TEXTAREA> </P><P> Do you like Jigsaw?<P> <INPUT TYPE="radio" NAME="attitude" VALUE="Yes">Yes<BR> <INPUT TYPE="radio" NAME="attitude" VALUE="No">No<BR> <INPUT TYPE="submit" VALUE="send this survey"> <INPUT TYPE="reset" VALUE="clear form and start over"> <BR> </FORM> and this code JigsawSurvey.java: package w3c.jigsaw.contrib; import java.util.*; import w3c.jigsaw.http.*; import w3c.jigsaw.forms.*; import w3c.jigsaw.html.*; public class JigsawSurvey extends PostableResource { public Reply handle(Request request, URLDecoder data) throws HTTPException { HtmlGenerator g = new HtmlGenerator("Jigsaw survey"); // set title g.append("<h1>The data you entered</h1>"); g.append("<ul>"); g.append("<li>your name: ", data.getValue("name")); g.append("<li>your email: ", data.getValue("email")); g.append("<li>your comments: ", data.getValue("content")); g.append("<li>you attitude to Jigsaw: ", data.getValue("attitude")); // Add as many append as you want g.append("</ul>"); Reply reply = request.makeReply(HTTP.OK); reply.setStream(g); return reply; } public JigsawSurvey() { } } work together very nicely. Thank you. Mark.
Received on Monday, 8 July 1996 00:53:44 UTC