Sunday, October 29, 2006

Disabling the right click of a browser window

When going through some of the forums i found out the way to disable a right click of the browser,
So in our applications we can create our own right click menu instead of the default menu that comes up. the code is prettty simple as it can be seen below

To disable the right click of the browser just use the following code on the body element of the html page
just define a oncontextmenu="return false;"
on the body element of your page
for calling your own function you can call your function before returning false. oncontextmenu="test();return false;"

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home