Skip to content
Snippets Groups Projects
user avatar
deuce authored
1) If the *.xjs.ssjs file exists and is newer than the *.xjs file, simply
   load()s the *.xjs.ssjs file.
2) Otherwise, generates the *.xjs.ssjs file from the *.xjs file as follows:
   Anything inside the tag <?xjs ... ?> is SSJS.

A simple welcome.xjs page would then be as follows:
<html>
<head>
<title><?xjs write(system.name)?></title>
</head>
<body>
Your SysOp <?xjs write(system.operator)?> would like to welcome you to
<?xjs write(system.name) ?>
</body>
</html>

This is converted to welcome.xjs.ssjs as follows:
writeln('<html>');
writeln('<head>');
write('<title>');
write(system.name);
writeln('</title>');
writeln('</head>');
writeln('<body>');
write('Your SysOp ');
write(system.operator);
writeln(' would like to welcome you to');
write('');
write(system.name) ;
writeln('</body>');
writeln('</html>');

Now all you PHP folks out there can get comfortable writing XJS scripts
if I understand how PHP embedding works.
758bd8ab
History
Name Last commit Last update
CVSROOT
ctrl
docs
exec
install
node1
node2
node3
node4
src
text
web
xtrn