Interactive HTMLab
];
##############################################################################
#
# Content of the editFrame.
#
$editFrameContent =
q[
<\SCRIPT LANG="JavaScript">
// invoked by the "Display" button
function doDisplay()
{
parent.dispFrame.location
= "javascript:parent.gen_dispFrameContent()";
}
// invoked by the "Validate" button
function doValidate()
{
document.validateForm.editBuffer.value =
document.editForm.editBuffer.value;
document.validateForm.submit();
}
// invoked by the "Options" link
function doOptions()
{
parent.openOptsWin();
}
// invoked by "Help" link
function doHelp()
{
document.reloadForm.editDocLoc.value = "htmlab:help";
document.reloadForm.submit();
}
\SCRIPT>
<\SCRIPT LANG="JavaScript">
document.editForm.editBuffer.defaultValue = parent.editDocContent;
document.editForm.editBuffer.value = parent.editDocContent;
\SCRIPT>
];
##############################################################################
#
# Content of the optsWin pop-up.
#
$optsWinContent =
q[
HTMLab Option Settings
];
##############################################################################
#
# The "default document" loaded if the user doesn't specify one.
# The URL "htmlab:default" is mapped to this document.
#
$dfltDocContent =
q[
document title
document body
];
##############################################################################
#
# The "help document" loaded when the user selects the "help" link.
# The URL "htmlab:help" is mapped to this document.
#
$helpDocContent =
q[
Welcome to the Interactive HTMLab
Welcome to the Interactive HTMLab
The Interactive HTMLab is a facility for demonstrating
and experimenting with HTML markup.
The screen is divided into two frames.
The display frame is the bottom half of the screen. You
are reading the display frame right now.
The editing frame is the top half of the screen. It
contains the HTML source of this document.
Edit or modify an HTML document in the editing frame window.
Press the Display button and the document will be rendered
into the display frame.
Press the Validate button and the document will be checked
for HTML errors. (Some installations do not support this feature.)
The Undo Changes button restores the document to its
original condition.
If you enter a URL into the Location field and press
ENTER, that document will be retrieved and loaded into
the HTMLab.
%ID%
];
##############################################################################
#
# Local subroutines.
#
#
# Convert a chunk of text into a multi-line Javascript string literal.
#
sub make_jsstr
{
$_ = shift; # before after
s/"/\\"/g; # FOO="bar" FOO=\"bar\"
s!(<\s*/?)(SCRIPT)!$1\\$2!gi; #