The simplest URL is just that generated by $url
in the script:
See <A HREF=$url>here</A>.
This URL might look something like this to the user (if they view the resulting HTML source in their browser):
See <A HREF=/cgi-bin/texis/myVortexScript/+wwr4tyuq>here</A>.
When this URL is invoked by the user, the same script
(/myVortexScript
) is run. The script's EXPORT
ed
variables, having been automatically saved (encoded in
/+wwr4tyuq
), are restored to their values. No function/MIME
extension was given, so the script defaults to starting at
main
and content type text/html
.
A more complex script may need to start at a particular function.
For example, a search script may print the results of a search, and
give a URL next to each hit for more information on that particular
item. These URLs, when followed, would call a function like
details
for further display of the chosen item. To accomplish
this, the details
function name is simply appended to
$url
in the script, along with a MIME extension, when printing
the initial search results:
For more info, see <A HREF=$url/details.html>here</A>.
When this URL is invoked, the script will start at the function
details
, and set the Content-Type
to "text/html
".
The MIME extension may differ if a different content type is needed. A script with a link to a print function that generates a Postscript document might use this:
<A HREF=$url/print.ps>Print</A> this document.
Here the function print
is the start, and the MIME type
application/postscript
(instead of text/html
) will be
set, which tells the user's browser to treat the document as Postscript.