SBM AppScript Reference → Introduction to SBM AppScript → SBM AppScript 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://myserver/tmtrack/tmtrack.dll?ScriptPage&scriptName=name… http://myserver/tmtrack/tmtrack.dll?ScriptPage&scriptID=number… http://myserver/tmtrack/tmtrack.dll?ScriptPage&scriptUUID=uuid…
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 URL:
http://YourBusinessManagerServer/tmtrack/tmtrack.dll?
→ScriptPage&scriptName=myScript&msg=This%20is%20a%20message
Copyright © 2007–2015 Serena Software, Inc. All rights reserved.