Opening a Document in a Web Browser
To open a document in your browser, use a URL that specifies an absolute or relative location for the document. An absolute location has the form:
A relative location can either be relative to the root path for the current document, in which case it begins with /, for example:
or relative to the directory containing the current document, for example:
Opening a Local File
To open a local file in your web browser, use a URL that has the form:
Use the file URL to examine local documents only; do not use it in documents that will be served by web servers.
<P>If you click on this link, you'll see a
confirmation dialog box.</A>
Opening a Mail Message Window
A URL that opens a mail message has the form:
Netscape Navigator 2.0 introduced an extension to the mailto URL so it can initialize the contents of a mail composition window. You can provide default values for header fields in the mail message. Each field name must be separated by
&. For example, the following mailto URL opens a mail message addressed to firstname.lastname@example.org. The subject field has the value "help needed", and the cc field has the value "email@example.com."
If the URL is used in a link, any header fields that do not correspond exactly to headers you can edit in a mail composition window are ignored. However, if it is used as the POST address of a form submission, all headers are generated, even unknown ones, except for "dangerous" headers. The headers that form submissions cannot set or override the default values are:
mailto:firstname.lastname@example.org?subject=help needed?New lines in the body must be hex encoded. For example, use %0A to indicate new lines. Not all browsers understand mailto URLs.
email@example.com?body=I need some help with version 3.15798 of the ABC software product.
http://hoohoo.ncsa.uiuc.edu:80/cgi/overview.htmlTo specify a URL that invokes a CGI program, specify the location of the CGI program, followed by a query string which contains the arguments for the program. A query string consists of a question mark, followed by the name/value pairs to be submitted to the program. Each name/value pair is separated by an &. Use the URL-encoded value %20 to indicate white spaces and %0A to indicate new lines. The following example invokes the program "compute.cgi" that takes three arguments. The value of the argument val1 is 25, val2 is 39, and text is "how now brown cow".
http://www.somecompany.com/Note that in the above example there should be no line breaks; the line break shown is for readability only. URLs for CGI programs can be absolute or relative, as discussed in Opening a Document in a Web Browser.
Last Updated: 01/26/98 21:33:44