![]() |
![]() RTXPS on-line Manual: HTML page generation
![]() RTXPS dynamic page generationRTXPS generated HTML pages dynamically;There are two types of HTML pages:
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
<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-2018 by: ESS Environmental Software and Services GmbH AUSTRIA | print page |