Click to See Complete Forum and Search --> : How do you hide a script?


_beetlebug_
02-16-2003, 01:39 AM
:confused:
How can I hide a script in the source so that nobody can see the script?
:confused:

kell_y
02-16-2003, 02:12 AM
Hi,

you can put the script in a separate file, and in the html file, import that javascript file, than you can call any function in that script file.

ie:

create file c:\t1.js, wint the following content

function greet()
{
alert('hi');
}

create html file

<html>
<head>
<script language="JavaScript" src="c:\t1.js"></script>

</head>
...

<script>
greet()
<script>
...
</html>