Example Videotex Server Page Specification

The Carapace Videotex Server is driven by a set of page specifications. A page spec defines the way data is laid out on the Videotex page.

An example of a page spec follows:

    (page "LOGON"

        (inputFields

            (user       20  28  5   ()  1   "string"    "enter your agent code")
            (password   21  15  5   ()  1   "password"  "enter your password")
            (reference  21  21  3   ()  1   "integer"   "enter a reference")
            (prompts    21  37  1   ()  1   "string"    "are prompts required?")
        )

        (outputData

            (moveTo 0 3)
            (text "Welcome to")

            (moveTo 5 4)
            (attributes doubleHeight fgBlue bgFromFg fgYellow)
            (text "Carapace Videotex Server  ")
            (attribute bgBlack)
            
            (moveTo 10 6)
            (text "Great Holidays + Great Software!")

            (moveTo 20 1)
            (attribute fgYellow)
            (text "Please enter: ABTA number")
            (moveTo 21 1)
            (attribute fgYellow)
            (text "Password/REF")
            (moveTo 21 25)
            (text "Prompts(Y/N)")
        )

        (validation (if (!= (pageData.get "password") "pongo") "authorisation failure"))

        (after START_after)
)
Much of the page spec is self explanatory -- the page name identifies the task done by the page, there are sections for the input, output and validation of data. There is also a section which is run after the user has completed the page -- this defines an action for the Videotex server to perform and the result is the name of the next page to display.

The elements which define the input fields are defined here.


Contents Current topic: videotex Related topics: Carapace Hub