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://server/workcenter/tmtrack.dll?ScriptPage&scriptName=name…
http://server/workcenter/tmtrack.dll?ScriptPage&scriptID=number…
http://server/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:

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

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

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

For details on using the URL context with an HTTP POST, refer to PostData Shell Properties.

For a detailed example of directly invoking a SBM ModScript via a URL, see https://www.serenacentral.com/blogs/entry/sbm-modscript-part-7-rest-call-into-modscript.