Dear All, I wanted to know how to disable the browser buttons programmatically when the JSP page is loaded on client screen. I wanted to know this to stop allowing user to view the JSP page source code by any means.
Well, they won't see the JSP code if they view source- they can only see the HTML that has been produced. I don't know of any way to completely prevent a user from viewing the html & javascript. In IE, you can disable right-clicking by setting document.oncontextmenu = new Function("return false;"); This won't disable the View > View Source menu option, and I'm not sure about Netscape. If you open a window (with document.open), you can specify that the new window should not have a menubar or toolbar. I'm not sure if any of that really gets at what you want. Do you really have html and javascript that you don't want users to see?
Salam All, Actually the user cannot see the JSP code since it is proccessed and resolved at server side. The user can only see the result of the JSP processing as a HTML page. Now, how can you prevent the user from not seeing the HTML source ? By not sending the response at all ! Regards
Post by:autobot
Is this the real life? Is this just fantasy? Is this a tiny ad?
a bit of art, as a gift, the permaculture playing cards