-----Original Message-----
How can I include a 'link' to javascript or vbscript in
a web page so all the javascript code won't be readily
accessible in the source view? I have a bit of code
and would rather not include it. with the html code.
You can put your JavaScript code in a file with a .js
filename extensions, and then include it with a statement
like:
<script language="JavaScript" src="myscript.js">
However, this provides very little additional security. A
curious visitor can easily open the myscript.js file and
look at it.
Similarly, you can obscure your code by removing all the
white space and using odd variable names. But that
curious visitor can easily reformat the results back to
readability.
In the end, nothing you send to the browser is 100%
secure. If you really want to hide your code, store it
and execute it on the Web server.
Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
||---------------------------------------------------
|| Web Database Development Step by Step .NET Edition
|| Microsoft FrontPage Version 2002 Inside Out
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------