SBM ModScript Reference → Introduction to SBM ModScript → SBM ModScript Contexts → Direct Access Contexts → 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 "¶m=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…
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
Copyright © 2007–2017 Serena Software, Inc. All rights reserved.