• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Disable right mouse click in pop-up window

 
Ranch Hand
Posts: 201
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Everyone,
I think, the subject line is quite clear and explainative.
I need to disable right-mouse click in the pop-up window.
I know how to do it in the same window..but what about the window which is opened thru function like below-
<!-- Begin
function url() {
hidden = open('http://www.swati.com,'NewWindow','status=no');
}
End -->
Anyone, who knows hot to do it, please help.
Thx
 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Swati,
Just paste this code at the top of your new window page ....
<script>
function handler(){
if(event.button == 2){
alert("No viewing the source code;-)")
return false;
}
}
document.onmouseup = handler
</script>
This should server the purpose
:-)
 
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That's all fine and dandy but what about code lifter?
That program will get source from anywhere no matter what u stick in the html. It will even grab js and css files
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic