HTML Syntax Reference

The information contained in this section is only a partial listing of the HTML tags that your Web browser understands. For more detailed information about HTML and elements needed to create a basic form, see the World Wide Web Consortium at www.w3.org or the Web Design Group at www.htmlhelp.com. Square brackets in syntax indicate that an attribute is optional; do not include the square brackets in your code.

HTML Tags

Quotation Marks

You can use quotation marks to enclose 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.

Anchor Tag

<A HREF=URL>
The HREF= attribute specifies a hypertext link. When selected by the user, this link invokes the Application Dispatcher. For example:
<A HREF="/cgi-bin/broker?
_service=default&_program=sample.webhello.sas">click me</A>
See URL Syntax for more information about URLs.

FORM Tag

<FORM ACTION=broker-URL [METHOD=GET | POST]>
The ACTION= attribute, included in the FORM tag, specifies the location of the Application Broker CGI program. For example:
<FORM ACTION="/cgi-bin/broker">
The METHOD= attribute is optional. It specifies the value GET or POST. The broker-URLcannot contain a question mark or have any parameters. For example:
<FORM ACTION="/scripts/broker.exe" METHOD=PUT>
  • Use GET for nonupdate programs that have no side effects. GET is limited to between 256 and 1024 characters total URL length, depending on your Web browser. If your application is complex, the resulting page's URL can become very long and might display variable information that you would prefer the user not see. You can bookmark pages by using GET.
  • Use POST for operations that have 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 user and hides the variables that can appear on the URL location line from the users. It also prevents form data from appearing in Web server logs. However, you cannot bookmark these pages.
On some Web browsers, such as Netscape, the reload button works with both GET and POST. On other Web browsers, such as Internet Explorer 3.02, refresh does not repost the form data. This works only with GET. If you omit the METHOD= attribute from the FORM tag, the Application Dispatcher uses the default GET.
Note: If you want to restrict applications from using either the GET or the POST method, use the ALLOW directive in the Application Broker configuration file. If you want to invoke the Application Dispatcher with a hypertext link, an inline image, or other URL, use the default method GET.

IMG Tag

<IMG SRC=image-URL[HEIGHT=value] [WIDTH=value] [ALT=value]>
A reference to an inline image causes the Application Dispatcher to be invoked as soon as the page is viewed. For example:
<IMG SRC="/cgi-bin/broker?_service=default&_program=sample.grphics.sas">
See URL Syntax for more information about URLs.

INPUT Tag

<INPUT TYPE=input-type NAME=input-name VALUE=input-value>
The INPUT tag specifies a simple input element inside a form. The INPUT tag can include the following attributes: TYPE=, NAME=, and VALUE=.
The TYPE= attribute identifies the type of input specified. Valid types are
Value
Description
CHECKBOX
specifies a single toggle button that is either on or off.
HIDDEN
indicates not to display the fields in the form on the Web browser.
PASSWORD
specifies a text-entry field where the entered characters are represented as asterisks.
RADIO
specifies a single toggle button that is either on or off. Other fields that have the same NAME are grouped into one-of-many behavior.
RESET
specifies a push button that re-sets input elements on the form to their default values.
SUBMIT
specifies a push button that packages data entered in the current form into a request that is sent to the Application Broker CGI (and then to SAS software for processing).
TEXT
A simple text-entry field.
The NAME= attribute identifies the name in a name/value pair that passes to the Application Broker CGI and then on to SAS software for processing.
The VALUE= attribute depends on the TYPE=.
  • For TYPE= TEXT or PASSWORD, use VALUE= to specify the default contents of the field.
  • For TYPE= CHECKBOX or RADIO, use VALUE= to specify the value that is passed in response to a checked button. Unchecked buttons are not passed by the Web browser.
  • For TYPE= SUBMIT or RESET, use the NAME= attribute to specify the label for the push button.

TEXTAREA Tag

<TEXTAREA NAME=field-name [ROWS=rows-value] [COLS=cols-value]>
The TEXTAREA tag inserts a free-form field for text, which enables the user to enter more than just a single line of text. Use this with the _FLDWDTH attribute.

URL Syntax

URLs must be encoded according to strict rules whether they appear in static HTML pages, are created by htmSQL or the Application Dispatcher in dynamic pages, or are typed manually into the Location field of the Web browser. This section gives a quick overview. For more information, see W3C's Web Addressing Overview at www.w3.org/Addressing.
Here is a sample URL that is broken into 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 Application Broker invocations).
yourcomp.com
indicates the name of the Web server.
cgi-bin
is the path to the Application Broker; an alias or directory mapping set up in the Web server.
broker
is the name of the program to run. For the Application Dispatcher this is usually broker, broker.exe, or broker.cgi.
? (question mark)
indicates the start of parameters.
name=value
is a name/value pair. URLs can have zero or more name/value pairs, just like an HTML form.
&
separates name/value pairs.
%nn
indicates an escape character in hexadecimal notation. In the example, %20 is a space. This escape notation is used for any characters in a name or value other than alphanumeric characters or one of the following punctuation marks: "-_.!~*'()". Use the URLENCODE function to escape characters in a URL string. For more information about the URLENCODE function, see the SAS Language Reference: Dictionary.
A partial URL results if the protocol, the Web server, or the path is omitted. Partial URLs 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 useful when you move pages between directories or servers, because there are fewer changes to make.