...

No Right Click in IFrame

Mgkeeper
07-16-2002, 06:30 PM
I have yet another IFrame question.

I use this script on my IFrame pages, and on the page that displays my Iframe:

<script type="text/javascript">
function disable()
{
if (event.button == 2)
{
alert("This content is mine!")
}
}
</script>

The problem is, it doesn't work. I can still right click in side the IFrame

Quiet Storm
07-16-2002, 08:33 PM
I would just give up on a no-right-click script. It never works:


<script type="text/javascript">
function disable()
{if (event.button == 2){alert("How dare you even think of stealing from me, fool!")}}
</script>
<script language="JavaScript1.2">
function disableselect(e){return false}
function reEnable(){return true}
//if IE4+
document.onselectstart=new Function ("return false")
//if NS6
if (window.sidebar){
document.onmousedown=disableselect
document.onclick=reEnable}
</script>


:D

premshree
07-17-2002, 02:14 PM
To disable right-click in the IFRAME, you have to place the script in that Frame also.

Personally, I find "no-right-click" useless.

jeree
10-28-2010, 05:28 AM
i have a wordpress website, but if its nto possible with a wordpress website, ill just use a typical html.
i need something that will make an ifram for me [of another website] but make it impossible to click or right-click, BUT can scroll.
Thank you.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum