Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Disabling Ctrl-N

Posted on 2004-04-24
2
Medium Priority
?
391 Views
Last Modified: 2012-05-04
Is there a way to prevent a user from spawning a new window. I want to hide the URL and (it is - until someone does a Ctrl-N).   This is just one approach I'm looking at -- it would be the easiest if it works, the others require more coding and changes but are better long term.  I was just looking for a solution to get my by for a while with a client.

Thanks.
0
Comment
Question by:Bl248
2 Comments
 
LVL 18

Accepted Solution

by:
Plucka earned 500 total points
ID: 10910590
Hi Bl248,

Yes there is.

Here is a working example.

<script language="javascript">
      function keyPress() {
            if (event.ctrlKey && event.keyCode == 78) {
                  event.keyCode = 0;
                  event.returnValue = false;
                  return false;
            }
      }
</script>

<body onkeydown="keyPress();">

Regards
Plucka
0
 

Author Comment

by:Bl248
ID: 10911544
Thanks very much .. I figured this had been asked and answered before but I was not able to find it after searching serverl different ways.

Thanks for your prompt reply.
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

916 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question