So to insert the date and time in your HTML you could do something like this:
<html>
<head>
<title>Example document</title>
</head>
<body>
The time is <$$=TIME$$>
The date id <$$=DATE$$>
</body>
</html>
Other commands invariable have the format:
<$$CMD;ARG1,ARG2,ARG3,..,ARGn$$>
The command is separated from the arguments by a ';' character and each argument is delimited by a ',' character.
This inserts an entire row from a table into the content. Multiple rows may be defined by separating them with a ",".
<$$XLATE;TABLE*ROWID$$>
Each argument is the name of a table followed by the row key to use, delimited by a "*". So if we wanted to insert these rows:
We would use:
<$$XLATE;HTML_TEST*TEST1,WIBBLE*TEST*23$$>
This inserts a JavaScript entity(s) as defined in the S/Web Repository. Multiple entities may be defined by separating them with a ",".
<$$JS;ENTID$$>
So to insert the REVSTRING JavaScript library into our document we use:
<$$JS;REVSTRING$$>
Note that SCRIPT tags are automatically inserted around the script inserted.
This inserts a Cascading Style Sheets entity(s) defined in the S/Web Repository. Multiple entities may be defined by separating them with a ",".
<$$CSS;ENTID$$>
So to insert the ZZ_STYLES CSS Sheet into our document we use:
<$$JS;ZZ_STYLES$$>
Note that STYLE tags are automatically inserted around the sheet inserted.
This command allows you replace placeholder strings with alternative strings held in the global SWAPLIST array. Multiple swap-strings may be defined by separating them with a ",".
<$$SWAP;PLACEHOLDER,PLACEHOLDER$$>
For example, if the SWAPLIST was set to replace an instance of "IMAGEDIR" with the string "http://www.someserver.com/images" then this document:
<html>
<head>
<title>Example document</title>
</head>
<body>
<img src="<$$SWAP;IMAGEDIR$$>/testpic.gif">
</body>
</html>
would be sent to the client as:
<html>
<head>
<title>Example document</title>
</head>
<body>
<img src="http://www.someserver.com/images/testpic.gif">
</body>
</html>
For more information on the SWAPLIST see XX
This command tells the system to execute a program and insert the results of the system variable @ans into the document at that point. Multiple programs may be defined by separating them with ','s.
<$$EXEC;PROG1,PROG2$$>
For example if we had this (very!) simple program:
subroutine testExec( void )
@ans = "Text inserted by testExec()"
return
we could use it like so:
<html>
<head>
<title>Example document</title>
</head>
<body>
<p><$$EXEC;TESTEXEC$$></p>
</body>
</html>
Which would return to the browser this:
<html>
<head>
<title>Example document</title>
</head>
<body>
<p>Text inserted by testExec()</p>
</body>
</html>
Parameters can be passed to the EXECed routine as follows
<html>
<head>
<title>Example document</title>
</head>
<body>
<p><$$EXEC;TESTEXEC(BLUE,RED),NEWEXEC$$></p>
</body>
</html>
where BLUE and RED are literals not variables.
<$$EVAL;code$$>
Eval evaluates and executes R/Basic script and inserts the contents of @ANS into the content stream. The results of this statement can be any HTML or text that would appear in your document. This can be embedded anywhere in your document, including Javascript or VBScript programs. For example, suppose you wish to have your Javascript contain the value of a symbolic.
......
sCompName = <$$EVAL;
Properties = "NAME"
CompName = ""
if www_Exec_Method( "GET", "PROPERTY", "NAME", CompName, "", "", "", "", errorText )
CompName = XLate( "COMPANY", CompName, "COMPANY_NAME", "X" )
If Len( CompName ) Else
CompName = "Unknown Company"
End
End
@ANS = CompName
$$> ;
alert( "Your company name is " + sCompName ) ;
..........
NOTE: Some visual HTML editors will escape the '$$' characters when working with your HTML pages so please bear this in mind when designing your pages!!
[top]
