A Server Connector syntactically differs from the Client Connector by only one parameter: "mode=server". This parameter tells the connector to call a function of the same name as the connector itself (unless overwritten by the parameter "callee") and pack and send back to the Client Connector the result, status and message variables returned from the function. The entire process is done in BEE Script. No JavaScript is required as it is on the server-side.
<script langauge="bee">
connector "findname" mode="server";
function findname
{
...
var result%function = ...;
return status=... message=...;
}
</script>
The server function page (indicated by the URL in the "call" command) does not necessarily reside on the same web site and therefore may run on different sessions and require separate authentication. If the server function require client privilege to access, another login function page (separate from the server function page but on the same web site) needs to be provided for the client to authenticate itself prior to any privileged access.
|