<html> <head> <title>This is DEMO 1</title> </HEAD> <body> <H2> DEMO 1</h2> <form method="post" action="FORMINPUT"> <B>Enter String: </b> <input TYPE="Text" NAME="STRING" SIZE=40 VALUE="Enter something Here"><BR><br> <B>Check or Uncheck this checkbox</b><br> <B>Check Box: </b><input type="Checkbox" value="CHECKED" name="CHECKBOX"><BR> <BR> <input type="submit" name="CANCEL" value="Cancel"> <input type="submit" name="DOIT" value=" Do It "> </form> </body> </html>Note the form method is post, this is required by the Load Html utility.
010 REM "DEMO1"
100 REM 100,5
105 DIM P!
110 PRINT 'gwin'("WEB"),
115 CALL "D_DEMO1",P![ALL]
120 REM "Don't accept Enter as end of input"
125 IF P!["CANCEL"]="" AND P!["DOIT"]="" THEN LET P!["FLAG"]="NoDisplay";GOTO 0115
130 PRINT 'gwin'("CONSOLE"),
135 PRINT "The Program D_DEMO1 returned because:"
140 IF P!["CANCEL"]<>"" THEN PRINT "Cancel button was hit"
145 IF P!["DOIT"]<>"" THEN PRINT "Do It button was hit"
150 PRINT ""
155 PRINT "The textbox contains:"+$22$+P!["STRING"]+$22$
160 PRINT "The Check Box is ",
165 IF P!["CHECKBOX"]<>"" THEN PRINT "Checked" ELSE PRINT "Unchecked"
The 'gwin'("WEB") causes the web view to be the current view.| P! | Value |
|---|---|
| ["url"]= | DIR(-1)+"HTML\FORMINPUT" - "FORMINPUT" is the ACTION= from the FORM tag |
| ["STRING"]= | the contents of the text box |
| ["CHECKBOX"]= | "" if not checked or "CHECKED" if checked - "CHECKED" is the VALUE= from the the INPUT tag |
| ["DOIT"]= | "" if the Do It button was not pressed or " Do It " if it was - " Do It " is the VALUE= from the the INPUT tag |
| ["CANCEL"]= | "" if the Cancel button was not pressed or " Cancel " if it was - " Cancel " is the VALUE= from the the INPUT tag |