File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes HTML, CSS and JavaScript and the fly likes Hiding javascript when html page is loading Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Hiding javascript when html page is loading" Watch "Hiding javascript when html page is loading" New topic
Author

Hiding javascript when html page is loading

Aravind Prasad
Ranch Hand

Joined: Dec 28, 2005
Posts: 263
Hello Ranchers.
I'm doing a project in JSP and Oracle. In some places i'm using server side scripting. And i found when i download the page where i'm using server side scripting the users can also download the js file from ther server.
Is it possible to block that js file or can hide the javascript code in the html page..

If possible please tell me how can i di that..

Thanks in Advance
regards
Aravind
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
server side scripting: You are running JavaScript on the server?

Eric
Aravind Prasad
Ranch Hand

Joined: Dec 28, 2005
Posts: 263
Dear Eric Pascarello,
Thanks for replying.. I'm using server side java scripting.. But when ever the page is opened in the browser. i click the save as page from thr browser menu and i can download the page.. AT that time the .js file is also downloading..
Is it possible for me to prevent the code by seeing others..

writing the javascript in some tags. like this
<hide>
<script language="javascript">
function encrypt()
{ //to-do
}
</script>
</hide>

so that when the page is downloading the script comming under the tage <hide> and </hide> is not visible by the end users..

Please reply.. whether is this possible or not..

Thanks in advance..
regards
Aravind
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
you can not hide JavaScript code from a users eyes.

Eric
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Hiding javascript when html page is loading
 
Similar Threads
include file without server side technology?
what is the URL ?
'F1' key binding in jSF
moving Struts validation into an external javascript file
client-side scripting?