User guide

eWON 500-2001-4001-4002 User Guide - User defined Web site
eWON 500®2001®4001®4002® Version 4_3_0 - User Guide - 10/5/05 - ©ACT'L sa - Page 183
• PRINT #0,xxx is an extended syntax of the PRINT command that will route printed data to the client WEB page. As for the common
PRINT command, if the sequence of data to print does not ends with a ";", a <BR> is added to the data to force a new line.
• The execution of the blocks occurs as the page is sent to the user. The blocks nearer from the top of page are executed first.
• The user will never see the Basic Block, he will only see the content of its execution.
SYNTAX:
The bASP syntax is:
<%#ExeSSI,Basic_block%>
When the block contains multiple BASIC lines, the leading space are not trimed, they are part of the line submitted to the BASIC interpreter and
should be avoided.
10.3.2 WEB context variables
When the client submits a WEB request to the eWON web server:
Then the web server will create a context to send a response to the client. This context will live until whole data in the index.shtm page have been
sent to the client. This context can be used by the BASIC bASP to save temporary data and the access the FORMS and REQUEST parameters.
SYNTAX:
The context variable in basic are ending with a "!", a context variable must always be in lowercase. The context variables are always STRING
variables (like A$).
10.3.2.1 Web context variables for request parameters
WEB servers support the syntax where client passes parameters to the server in the URL. In this syntax, each parameter is separated by a &, the
first parameter is separated from the file URL by a ? and each parameter has the format param_name=param_value (param_name in
lowercase).
Example:
Requests the index.shtm page with:
param1=1234
param2=ABCD
The context variables param1 and param2 will automatically be created. This means that any bASP program block in the index.shtm page will
have access to the 2 basic variables param1! and param2!
Example:
GET /usr/index.shtm
http://10.0.0.53/usr/index.shtm?param1=1234&param2=ABCD
<html>
<head>
<title>SSI Demo</title>
</head>
<body>
<p>
Param1:<%#ExeSSI,PRINT #0,param1!%><BR>
Param2:<%#ExeSSI,PRINT #0,param2!%><BR>
</p>
</body>
</html>