|
HTML Syntax Reference
For detailed information about HTML and elements needed to create a basic form, see the World
Wide Web Consortium or HTML
Help from the Web Design Group.
You can use quotation marks to surround the values provided in your HTML page, and you should use quotation marks if the values contain blanks. Use double, not single, quotation marks. If you are entering text that contains a single quotation mark, you must enclose the entire string in double quotation marks.
- <A HREF=URL>
- A hypertext link that, when selected by the user, invokes the Dispatcher. For example:
<A HREF="/cgi-bin/broker?_service=default&program=sample.hello.sas">
click me
</A>
The URL needs to be in the URL-encoded
format.
- <FORM ACTION=broker-URL
[METHOD=GET|POST]>
- The ACTION= attribute, included in the FORM tag,
specifies the location of the Broker CGI program.
- Example:
<FORM ACTION="/cgi-bin/broker">
The FORM tag can also include a METHOD attribute that specifies either GET or POST as values. Either way, the broker-URL should not contain a question mark or have any parameters.
- GET: Use GET for nonupdated programs that don't have side effects. You can bookmark pages using GET. GET
is limited to between 256 and 1024 characters total URL length, depending on your browser. If your application is complex, the resulting page's URL can become very long and display variable information that you would prefer that the user not see.
- POST: Use POST for operations with potential side effects (such as writing to a
data set). POST is a simple security technique that hides the inner workings of your application from the end user: it hides the variables that can appear on the URL location line from your users. It also prevents form data from appearing in Web server logs. However, your users cannot bookmark these pages.
On some browsers, such as Netscape, the reload button works with both GET and POST; however, on other browsers, like Internet Explorer, refresh does not repost the form data and this works only with GET. If you omit the METHOD= attribute from the FORM tag, the Dispatcher uses the default of GET.
Note: If you want to restrict applications from using either the GET or POST method, use the ALLOW directive in the Broker configuration
file. However, if you want to invoke the Dispatcher
with a hypertext link, inline image, or other URL, leave
the default GET method enabled.
- <INPUT TYPE=type NAME=name
VALUE=value>
- The INPUT tag specifies a simple input element
inside a form. The INPUT tag can include the
following attributes:
- TYPE, which identifies the type
of input specified. Valid types follow.
Value |
Description |
CHECKBOX |
A single toggle button that is either
on or off. |
HIDDEN |
An indication not to display the
fields in the form on the browser. |
PASSWORD |
A text entry field where the entered characters are represented as asterisks. |
RADIO |
A single toggle button that is either on or off. Other fields with the same NAME are
grouped into one-of-many behavior. |
RESET |
A push button that resets input
elements on the form to their default
values. |
SUBMIT |
A push button that packages data
entered in the current form into a
request that is
sent to the Broker CGI
(and then on to SAS software for
processing). |
TEXT |
A simple text entry field. |
- NAME, which identifies the name in a name/value pair that passes to the Broker CGI and then on to SAS software for processing.
- VALUE, which depends on the INPUT TYPE:
- For a text or password entry field, use VALUE to specify the default contents of the
field.
- For a checkbox or radio button, use VALUE to specify the value passed in response
to a checked button. Unchecked buttons are not passed by the browser.
- For SUBMIT and RESET, use the NAME attribute to specify the label for the push button.
- <IMG SRC=URL [HEIGHT=value]
[WIDTH=value] [ALT=value]>
- A reference to an inline image that causes the Dispatcher to be invoked as soon as the page is viewed. For example:
<IMG SRC="/cgi-bin/broker?_service=default&program=sample.grphics.sas">
The URL needs to be in the URL-encoded
format.
- <TEXTAREA NAME=name
[ROWS=value] [COLS=value]>
- The TEXTAREA HTML tag lets you insert a
free-form field for text, which allows the user to enter more than just a single line of text. Use this with the _FLDWDTH
attribute.
Whether they appear in static HTML pages, in dynamic ones created by htmSQL or the Dispatcher, or they are typed manually into the browser's Location: field, URLs must be encoded according to strict rules. This section gives a quick overview; for more information, see W3C's Web Addressing Overview.
Here's a sample URL, broken onto two lines for readability:
http://yourcomp.com/cgi-bin/broker?_service=default
&_program=dev.houses.sas&name=Fred%20Jones
where:
http: |
is the protocol (must be http: for Broker
invocations). |
//yourcomp.com |
indicates the name of the Web server. |
/cgi-bin |
is the path to the Broker; an alias or directory mapping set up in the Web server. |
broker |
is the name of the program to run. |
? |
indicates the start of parameters. |
name=value |
a URL address can have zero or more name/value
pairs, just like an HTML form. |
& |
is the character used to separate name/value
pairs. |
%nn |
indicates an escaped character in hex. In the
example, %20 is a space. |
If the protocol, Web server, or path is omitted, it is called called a partial URL. Partial URL's use information from the currently viewed page to fill in the blanks. For example, if your current page is "http://yourcomp.com/cgi-bin/broker?_debug=4" and the source code references the URL
"broker?_service=default&_program=x", then the actual URL is "http://yourcomp.com/cgi-bin/broker?_service=default&_program=x". This is very handy when moving pages between directories or servers because there are fewer changes to make.
|