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 How to disable CTRL+F Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "How to disable CTRL+F" Watch "How to disable CTRL+F" New topic
Author

How to disable CTRL+F

Sanjeev Gowda
Greenhorn

Joined: May 27, 2005
Posts: 5
Hi all Java Gurus,
I have created a jsp page and i want to disable CTRL+F bcoz when ever any user searches the page through CTRL+F the whole allignment gets changed so i want to disable it or either redirect it and give a alert message that CTRL+F is disabled. Please solce my Query and also tell me where to call the function for disabling or redirecting. As the user can press CTRL+F at any time or any where in the page.
Thanks in Advance
Regards
Sanjeev
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61105
    
  66

Firstly, this has nothing to do with JSP so I'm moving it to the HTML forum.

Secondly, what an incredibly unfriendly thing to do! Why not just fix your code?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Zip Ped
Ranch Hand

Joined: Jul 26, 2005
Posts: 336
You need to capture the keystroke combo and return the javascript function so that the browser action is not taken in the first place.
 
wood burning stoves
 
subject: How to disable CTRL+F