Page 1 of 1

webgadget disable contextmenu the easy way :)

Posted: Fri Dec 22, 2006 11:51 pm
by utopiomania
If you use the webGadget and want to disable the right click context menu you can either use
a callbak(=urk..), or simply add oncontexmenu.. to your html body tags:

Code: Select all

"<body oncontextmenu = 'return false;'>"
This method work very well if you can use it (= you have control over the html loaded
into the webgadget), the principle beeing Keep It Simple Stupid :)

Posted: Mon Dec 25, 2006 10:10 pm
by AND51
Should only work with IE 6 or higher.

Maybe, this works with Mozialla as well, my knowlege is several years old now...

Posted: Wed Dec 27, 2006 10:37 pm
by utopiomania
Ok? IE's before 6 can't run javascript then, is that what you try to say? Or is my syntax wrong, or what? :?

Posted: Thu Dec 28, 2006 12:42 am
by AND51
In my opinion, 'onContextmenu' is a JavaScript eventhandler, that is only supported in IE 5.x or 6.0 (and higher).

But my knowlege is not up to date, so maybe this eventhandler is now suppoerted by other browsers, too. Last time I coded JavaScript was about 2 years ago.

@ Mozilla/FireFox: I recognized, that this browser interprets JavaScript almost identically with IE, so maybe this is the onliest other browser, supporting this eventhandler.

Posted: Thu Dec 28, 2006 3:57 am
by Intrigued
I used this in the other programming platform I use that "borrows" I.E. and it works great!

Thanks for sharing.