Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Hiding javascript when html page is loading

 
Aravind Prasad
Ranch Hand
Posts: 265
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
server side scripting: You are running JavaScript on the server?

Eric
 
Aravind Prasad
Ranch Hand
Posts: 265
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
you can not hide JavaScript code from a users eyes.

Eric
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic