^^^^^^^^^^^
Does ABC, Inc., New York, know that you are abusing their domain to
falsify your sender address and thus perpetrate a violation of both
Internet/Usenet standards and the Consumer Terms and Conditions of
your service provider, Rogers Communications, Inc., Markham, CA?
^^^^^^
[...]
I need to hide the original javascript from visitors and only let them see
the exact HTML ouput from the js file. [...]
Are you sure you know about the diversity of the Web, its users and
their software?
Here is a sample script:
<form>
<input type=button value="Print Multiplication Table"
onClick="writeMTable()">
</form>
<script language="JavaScript">
This should read
<script type="text/javascript">
Ask Google (Groups).
Remove that, it is obsolete.
function writeMTable() {
document.writeln(
'<html><head><title>Multiplication Table. For printing, choose File |
Print</title></head>'
+'<body> This is HTML output'
)
document.writeln('</body></html>')
When using ETAGO delimiters within CDATA, especially when writing HTML close
tags within "script" elements, ETAGOs (and close tags in general for buggy
clients) must be escaped to prevent premature end of the parent element:
document.write('<\/body><\/html>');
Besides, the markup you are generating and generating with is both far from
Valid HTML.
You can then safely omit this, too.
writeMTable()
</script>
[...]
It is a Dynamic pages, so I can not simply save file as a static page. Is
there a way for Perl to call a JS script to make it output?
For either client-side Perl or server-side JS, maybe.
or Let Lynx activate JS scripts?
No, and there are plenty of users who have UAs with JS support but have the
feature disabled or restricted. You see that generating whole documents
with client-side scripting (whatever language is used) is not a viable
solution on the Web.
PointedEars