kuntilanak
asked on
hide javascript function
How can I hide a javascript function that is embedded in an aspx page so that when a user does a view->source, then they can't see the particular javascript code. I know there isn't a way to 100% hide it, but some ways to do this are appreciated..
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Yes.
however it is not secure, it will only hide it for someone not very technical
however it is not secure, it will only hide it for someone not very technical
You could put the code into an external file and reference it using the code below. This will hide it from the view source but if you use any plugin for developers you will be able to view the associated javascript. Ultimately the script needs to be processed by the client so it will be sent to the client and is therefore visible.
Cheers,
Lee
Cheers,
Lee
<script language="javascript" src="../somelocalpath/file.js"></script>
ASKER