URL Direct Access Context

A script can generate HTML output to be viewed in the browser without using an HTML template. A URL can invoke a script directly and display the output in the browser. In this case, the script must generate valid HTML for an entire browser page, including the <HTML> start and end tags. Such scripts are invoked by browsing to a URL in one of the following formats, where "..." denotes zero or more optional URL parameters of the form "&param=value.>

http://myserver/tmtrack/tmtrack.dll?ScriptPage&scriptName=name…
http://myserver/workcenter/tmtrack.dll?ScriptPage&scriptName=name…
http://myserver/tmtrack/tmtrack.dll?ScriptPage&scriptID=number…
http://myserver/workcenter/tmtrack.dll?ScriptPage&scriptID=number…
http://myserver/tmtrack/tmtrack.dll?ScriptPage&scriptUUID=uuid…
http://myserver/workcenter/tmtrack.dll?ScriptPage&scriptUUID=uuid…
When requesting a script in the URL context, the script name can be passed unambiguously by using the following optional parameters:
Any optional parameters following the name/ID are inserted into a Dictionary object which is passed to the script. This Dictionary object is identical to the one constructed in the HTML template context, with the exception that the key names are taken from the URL parameter names, rather than being generated sequentially as "param1," "param2," etc.
Note: URL parameter names are converted to lower case before being stored in the Shell.Params dictionary. To retrieve parameter values, you must supply parameter names in lower case, such as Shell.Params.Item("msg") .

For example, the following script generates an entire browser page displaying a message given by a URL parameter:

Call Ext.WriteStream("<HTML>")
Call Ext.WriteStream("<HEAD><TITLE>Script Test</TITLE></HEAD>")
Call Ext.WriteStream("<BODY><H2>" & Shell.Params.Item("msg"))
Call Ext.WriteStream("</H2></BODY>")
Call Ext.WriteStream("</HTML>")

If this script is named "myScript," you can invoke it by browsing to the following URLs:

http://myServer/tmtrack/tmtrack.dll?
ScriptPage&scriptName=myScript&msg=This%20is%20a%20message
http://myServer/workcenter/tmtrack.dll?
ScriptPage&scriptName=myScript&msg=This%20is%20a%20message