RTXPS on-line Manual: HTML page generation

Release: 1.3
Date: July 2003
Revision:2.0

RTXPS dynamic page generation

RTXPS generated HTML pages dynamically;

There are two types of HTML pages:

  1. Basic full-screen pages;
  2. Pop-up pages
In both cases, the input to the page generation function (html_display(), dc_display(), html_popup(), dc_popup()) is loaded either from the DocCentre content server or, alternatively, from the local file system.

The HTML content loaded from either source corresponds to the HTML code WITHIN the <BODY> and </BODY> tags of HTML. Header and foater components are dynamically supplied by RTXPS.

In the I>init() function that opens a course, the designed can specify

  1. a document root (for local files)
  2. a customised header and footer file.
An example of a header file is shown below:

<BODY BGCOLOR="White" TEXT="BLACK" LINK="Blue" VLINK="GRAY" ALINK="Blue">
<FORM name="qform" METHOD="post" ACTION="/cgi-bin/rtxps">
<INPUT NAME="USER" TYPE="HIDDEN" VALUE="\user">
<INPUT NAME="KB" TYPE="HIDDEN" VALUE="\kb">
<SCRIPT LANGUAGE="JavaScript">
function getAbsX(elt) { return (elt.x) ? elt.x : getAbsPos(elt,"Left"); }
function getAbsY(elt) { return (elt.y) ? elt.y : getAbsPos(elt,"Top"); }
function getAbsPos(elt,which) {
    iPos = 0;
    while (elt != null) {
        iPos += elt["offset" + which];
        elt = elt.offsetParent;
        }
    return iPos;
}
function selsetin(id) {flagsetin = id}
function selsetout() {flagsetdown = 0; flagsetin = "";}
function selsetdown() {flagsetdown = 1; return (false);}
function selsetup() {flagsetdown = 0;}
function selsetfirst() {flagsetfirst = 1;}
function selreset(id) {
    title = document.all[id].title.split("-");
    xx = document.all["DD"+id].value - title[0];
    range = title[1] - title[0];
    xx = xx / range * 100;
    if (xx < 0) xx = 0;
    if (xx > 100)   xx = 100;
    xx += getAbsX(document.all[id]);
    document.all["j"+id].style.left = xx;
    document.all["j"+id].style.top = getAbsY(document.all[id]) - 2;
    return (false);
    }
function selsetmove() {
    if (flagsetfirst) {selsetall(); flagsetfirst = 0;}
    if ((flagsetin != "") && (flagsetdown == 1)) {
        xx = event.x;
        if (xx < getAbsX(document.all[flagsetin]))
            xx = getAbsX(document.all[flagsetin]);
        if (xx > getAbsX(document.all[flagsetin]) + 100)
            xx = getAbsX(document.all[flagsetin]) + 100;
        document.all["j"+flagsetin].style.left = xx;
        document.all["j"+flagsetin].style.top =
            getAbsY(document.all[flagsetin]) - 2;
        xx -= getAbsX(document.all[flagsetin]);
	title = document.all[flagsetin].title.split("-");
	range = title[1] - title[0];
	min = title[0] - 0;
	xx = xx * range / 100 + min;
	rem = xx % 1;
	xx -= rem;
        document.all["DD"+flagsetin].value = xx;
        return (false);
        }
    }
function selsetinit(id) {
    document.all["j"+id].style.left = getAbsX(document.all[id]);
    document.all["j"+id].style.top = getAbsY(document.all[id]) - 2;
    }
selsetout(); selsetup(); selsetfirst();
</SCRIPT>
<FONT FACE="Arial,Helvetica">
<CENTER>
<TABLE WIDTH=780 BORDER=0>
<TR><TD WIDTH=780>
<IMG SRC="/GIF/header.gif" WIDTH=780 HEIGHT=20 BORDER=0 ALT=""><BR>
<TABLE WIDTH=780 CELLPADDING=4 BORDER=1> <TR>
<TD>
<img src="/dcag03/dclogo.gif" alt="" width="155" height="45" border="0"></TD>
<TD>
Benutzer:   <B>\user</B></TD>
<TD>Seite geladen:<B>\time</B>
<TD ALIGN=CENTER WIDTH=190>
<INPUT TYPE="image" NAME="Abort" SRC="GIF/abort.gif">
<INPUT TYPE="image" NAME="Stop" SRC="GIF/stop.gif">
<INPUT TYPE="image" NAME="Submit" SRC="GIF/weiter.gif">
</TD>
</TABLE>
</PRE>

and the corresponding footer file:

<font size="-3" color="#808080">Path of this page: \abspagename</font>
</TD></TR></TABLE></CENTER></CENTER></FONT></BODY></HTML>

The customisable part is OUTSIDE the javascript part (i.e., outside the <SCRIP> .... </SCRIPT> part and also expludes the <FORM> ... </FORM> at the beginning.

What the user can change is the style of the header, form and text of the buttons, logo, etc., as well as the us of the in-line functions \user and \time shown here as an example. The resulting header and page look like this:

 


© Copyright 1995-2016 by:   ESS   Environmental Software and Services GmbH AUSTRIA | print page