External Interfaces > RealWeb > RealWeb API > Writing a RealWeb Subroutine (RealWeb)

Comment on this topic

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)

To

Reality

Version

Topic

Submitted by

Company

Location

Email address

Comment

 

 

Writing a RealWeb Subroutine

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 APIClosed 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.

See Also

Examples

The topics listed above include simple examples to get you started. More comprehensive examples are available:

 

RealityV15.1 (MoTW) Revision 7Comment on this topic