Documentation Comments
Use this form to comment on this topic. You can also provide any general observations about the Online Documentation, or request that additional information be added in a future release.
RealityV15.1Online Documentation (MoTW) Revision 7
Writing a RealWeb Subroutine (RealWeb) (writesub.htm)
A RealWeb subroutine is a normal DataBasic external subroutine that accepts no parameters and that calls routines from the RealWeb API to construct an HTML page. Subroutines that will be called remotely using RealWeb must be enabled; see Enabling your RealWeb Subroutine.
Note: If you need to pass parameters to your subroutine, you must include them in the URL and access them using the RW_GET_PARAM API routine. See Passing Data to a RealWeb Subroutine for more details.
You must include the item #RW.INCLUDE.DEFS in all RealWeb subroutines; for example, you could add the line
INCLUDE #RW.INCLUDE.DEFS FROM /SYSFILES/REALWEB,BP
at the start of every subroutine, or create an item to be automatically included containing this line.
This item defines certain symbols that are used when calling some
of the API routines. For example, some subroutines take a Control parameter
which is used to specify the destination
output buffer.
This parameter can take one of four values: RWD-NORMAL, RWD_HEAD, RWD_JAVASCRIPT,
RWD_ERROR; these four symbol names are defined in #RW.INCLUDE.DEFS.
The topics listed above include simple examples to get you started. More comprehensive examples are available:
In the RealWeb demonstration; this can be installed from the Reality CD.
Note: The RealWeb demonstration is part of the Reality demonstration which you install by clicking the Demo button on the initial screen. If you already have Reality installed, you must choose the Custom option (for details, refer to the Reality External Components, Installation Guide). The RealWeb demonstration can be found on the Demonstration Software menu.