Previous | Contents | Index |
The default SUBMIT buttons are:
To create your own custom submit buttons insert the following HTML code inside your form code:
<input type=submit name=submit value="Send Info"> |
The same can be done to custom create your own Exit, Help and Back buttons.
You can place the submit buttons whereever you want on the form.
Example 9-19 Custom Submit Buttons |
---|
form$ = '<form>' form$ = form$ + '<h2>Test Question</h2><p>' form$ = form$ + '1. Solve the following equation: <b>1=sin(3x) - cos(6x)</b>' form$ = form$ + '<p>Type in your final answer inside the space provided below.<p>' form$ = form$ + '<input type=text name=solution value="type your solution here"><p>' form$ = form$ + '<input type=submit name=submit value="Send my solution!">' form$ = form$ + '<input type=submit name=exit value="Uh-Uh! Get me outta here!">' form$ = form$ + '<input type=submit name=help value="Help...me....">' form$ = form$ + '<input type=submit name=back value="Back up!">' form$ = form$ + '</form>' input dialogbox form$: ans$ end |
Images can be used for submit buttons in INPUT DIALOGBOX. The format is:
<input type=submit name=submit src="url_of_image.jpg"> |
Example 9-20 Image Submit Buttons |
---|
img_location$ = 'sheerpower:samples' form$ = '<form>' form$ = form$ + '<sheerpower color="white">' form$ = form$ + '<h2>Test Question</h2><p>' form$ = form$ + '1. Solve the following equation: <b>1=sin(3x) - cos(6x)</b>' form$ = form$ + '<p>Type in your final answer inside the space provided below.<p>' form$ = form$ + '<input type=text name=solution value="type your solution here">' form$ = form$ + '<input type=submit name=submit src="'+ img_location$ + '\help_submit.jpg">' form$ = form$ + '</form>' input dialogbox form$: ans$ end |
The SELECT tag creates a drop down menu inside a form. Inside SELECT, only a sequence of OPTION tags is allowed. Each sequence can be followed by an arbitrary amount of plain text.
Example 9-21 <select >... </select > Tag |
---|
form_menu$ = '<form>' form_menu$ = form_menu$ + 'City: <select name=city>' form_menu$ = form_menu$ + '<option value="San Diego">San Diego, CA' form_menu$ = form_menu$ + '<option value="Las Vegas">Las Vegas, NV' form_menu$ = form_menu$ + '<option value="Minneapolis">Minneapolis, MN' form_menu$ = form_menu$ + '</select>' form_menu$ = form_menu$ + '</form>' input dialogbox form_menu$: choice$ end |
Attribute | Function |
---|---|
name | the symbolic name for this SELECT element (must be present) |
size | the value of SIZE then determines how many items will be visible |
multiple | if present (no value), specifies that the SELECT should allow multiple selections (n of many behavior) |
Example 9-22 <select > Tag and Attributes |
---|
form_menu$ = '<form>' form_menu$ = form_menu$ + 'City: <select multiple size=2 name=city>' form_menu$ = form_menu$ + '<option value="San Diego">San Diego' form_menu$ = form_menu$ + '<option value="Las Vegas">Las Vegas' form_menu$ = form_menu$ + '<option value="Minneapolis">Minneapolis' form_menu$ = form_menu$ + '<option value="Pheonix">Pheonix' form_menu$ = form_menu$ + '<option value="New York">New York' form_menu$ = form_menu$ + '<option value="New Jersey">New Jersey' form_menu$ = form_menu$ + '</select>' form_menu$ = form_menu$ + '</form>' input dialogbox form_menu$: choice$ end |
The TEXTAREA tag is used to place a multiline text entry field with optional default contents in a fill-out form.
Attribute | Function |
---|---|
name | the symbolic name of the text entry field |
rows | the number of rows (vertical height in characters) of the text entry field |
cols | the number of columns (horizontal width in characters) of the text entry field |
Example 9-23 <textarea >... </textarea > tag |
---|
form_box$ = '<form>' form_box$ = form_box$ + '<textarea name=comments rows=10 cols=30>' form_box$ = form_box$ + 'Please type your comments in here.' form_box$ = form_box$ + '</textarea>' form_box$ = form_box$ + '</form>' input dialogbox form_box$: choice$ end |
9.4.3 Formatting Tags
9.4.3.1 CENTER
The CENTER tag defines text that should be centered.
Example 9-24 <center >... </center > tag |
---|
test$ = '<form>' test$ = test$ + '<center><b><h3>Book Request Form</center></h3></b><p>' test$ = test$ + 'Title: <input type=text name=title size=46><br>' test$ = test$ + 'Author: <input type=text name=author size=45>' form$ = test$ + '</form>' input dialogbox test$: answer$ end |
The PARAGRAPH tag starts a new paragraph by separating one paragraph from another with white space. The </P> tag is optional if the tag is only to insert space between two paragraphs, but vital when attributes (for example, ALIGN="center") are to apply to the whole paragraph. The ALIGN attribute can be one of LEFT, RIGHT, or CENTER.
Example 9-25 <p >... </p > tag |
---|
text$ = '<form>' text$ = text$ + '<b>Paragraph Example</b>' text$ = text$ + '<p>The following paragraphs will ' text$ = text$ + 'illustrate the left, right and center attributes to the ' text$ = text$ + 'paragraph tag.' text$ = text$ + '<p align=left>' text$ = text$ + 'This Agreement is governed by, and construed in accordance with, ' text$ = text$ + 'the laws of the State of California, without regard to your actual state or ' text$ = text$ + 'country of residence. Any modification of any provision of this Agreement will' text$ = text$ + ' be effective only if in writing and signed by TTI.</p>' text$ = text$ + '<p align=right>' text$ = text$ + 'If, for any reason, a court of competent jurisdiction ' text$ = text$ + 'finds any provision or portion of this Agreement to be unenforceable, the remainder ' text$ = text$ + 'of this Agreement will continue in full force and effect.</p>' text$ = text$ + '<p align=center>' text$ = text$ + 'This Agreement constitutes the entire agreement between ' text$ = text$ + 'you and TTI, with respect to the subject matter at hand. This Agreement supersedes ' text$ = text$ + 'and replaces all other understandings or agreements, written or oral, regarding such ' text$ = text$ + 'subject matter.</p>' input dialogbox text$: answer$ end |
The LINE BREAK tag breaks the current line of text. There is no </br> tag.
Example 9-26 <br > tag |
---|
test$ = '<form>' test$ = test$ + '1<br>2<br>3<br>4<br>5<br>6<br>7<br>8<br>9<br>10' test$ = test$ + '</form>' input dialogbox test$: answer$ end |
The ORDERED LIST tag introduces an ordered (numbered) list, which is made up of list item (LI) tags.
Example 9-27 <ol >... </ol > tag |
---|
nlist$ = '<form>' nlist$ = nlist$ + '<ol>' nlist$ = nlist$ + '<li>This is the first item' nlist$ = nlist$ + '<li>This is the second item' nlist$ = nlist$ + '<li>This is the third item' nlist$ = nlist$ + '<li>This is the fourth item' nlist$ = nlist$ + '</ol>' nlist$ = nlist$ + '</form>' input dialogbox nlist$: example$ end |
Previous | Next | Contents | Index |