Disable Right Click on HTML page
3 posters
Page 1 of 1
Disable Right Click on HTML page
I want to disable right click on a HTML page. Not a pop-up disable, but a complete disable where right clicking does nothing.
Can anyone help me with a code for it please? Thanks
On a note,
for my forum, I have it so that you get a popup for disable right click. By for my HTML page, I want to disable it completely. However, I'm using the "Use forum header" option, and since my popup disable right click script is a forum widget, that one shows up too. I just added this cause I thought that might be helpful info.
TY !
Can anyone help me with a code for it please? Thanks
On a note,
for my forum, I have it so that you get a popup for disable right click. By for my HTML page, I want to disable it completely. However, I'm using the "Use forum header" option, and since my popup disable right click script is a forum widget, that one shows up too. I just added this cause I thought that might be helpful info.
TY !
SoSweet- New Member
- Posts : 15
Reputation : 1
Language : English
Re: Disable Right Click on HTML page
https://help.forumotion.com/t50779-script-to-disable-the-right-click
Please read the tutorial. There is a no pop-up version for forum as well as html pages.
Please read the tutorial. There is a no pop-up version for forum as well as html pages.
Sanket- ForumGuru
- Posts : 48766
Reputation : 2830
Language : English
Location : Mumbai
Re: Disable Right Click on HTML page
yea but where do i put in this part?
I dont get this:
I have no body tags....
edit: oh wait, i just add this:
right? forget about the javascript thing??
- Code:
<BODY oncontextmenu="return false">
</body>
I dont get this:
Add the attribute above ( oncontextmenu="return false" ) in the first body tag and it will silently disable right clicks from your mouse.
Example of this code on my forum ~ Click Here
I have no body tags....
edit: oh wait, i just add this:
- Code:
<BODY oncontextmenu="return false">
</body>
right? forget about the javascript thing??
SoSweet- New Member
- Posts : 15
Reputation : 1
Language : English
Re: Disable Right Click on HTML page
Add this code instead.
General>Forum>Configuration
Site Description: Add the code below.
General>Forum>Configuration
Site Description: Add the code below.
- Code:
<script language=Javascript1.2> function ejs_nodroit() { return(false); } document.oncontextmenu = ejs_nodroit; </script>
Sanket- ForumGuru
- Posts : 48766
Reputation : 2830
Language : English
Location : Mumbai
Re: Disable Right Click on HTML page
thanks, but I only want the script in one HTML page
that code will put it in all pages
that code will put it in all pages
SoSweet- New Member
- Posts : 15
Reputation : 1
Language : English
Re: Disable Right Click on HTML page
http://www.webartzforum.com/t85-start-learning-html
See the body tags when you make a html page.
See the body tags when you make a html page.
Sanket- ForumGuru
- Posts : 48766
Reputation : 2830
Language : English
Location : Mumbai
Re: Disable Right Click on HTML page
Sanket wrote:Add this code instead.
General>Forum>Configuration
Site Description: Add the code below.
- Code:
<script language=Javascript1.2> function ejs_nodroit() { return(false); } document.oncontextmenu = ejs_nodroit; </script>
is that one better than
- Code:
<BODY oncontextmenu="return false">
</body>
??
because the second one cant be disabled by turning off javascript.
just curious.
SoSweet- New Member
- Posts : 15
Reputation : 1
Language : English
Re: Disable Right Click on HTML page
This code needs to be added to a html page.
See an example, add this when you create a html page.
- Code:
<BODY oncontextmenu="return false">
</body>
See an example, add this when you create a html page.
- Code:
<html>
<head>
<title>My First HTML Page - WebArtz</title>
</head>
<BODY oncontextmenu="return false">
<h1>This is the HTML page header.</h1>
<p>Here is a paragraphi I wrote for my first HTML page.</p>
</body></html>
Sanket- ForumGuru
- Posts : 48766
Reputation : 2830
Language : English
Location : Mumbai
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum