...

View Full Version : no click & no right click in iframe, but with scrolling abilities.



jeree
10-28-2010, 05:29 AM
whoops, i accidentally posted in some really old post :O sorry about that.
anyways,

i have a wordpress website, but if its not possible with a wordpress website, ill just use a typical html.
i need something that will make an iframe for me [of another website] but make it impossible to click or right-click, BUT can scroll.
Thank you.

abduraooft
10-28-2010, 08:32 AM
but make it impossible to click or right-click, BUT can scroll.Impossible! There's no fool proof method to block users' freedoms.

teedoff
10-28-2010, 03:42 PM
Here we go again...lol There is a long loooonngggg thread, and I do believe it has been made a sticky, about this same topic in one of the other forums here at this site. Why not search for it.

ok I found it for you.

http://codingforums.com/showthread.php?t=4437

jeree
10-28-2010, 06:11 PM
Here we go again...lol There is a long loooonngggg thread, and I do believe it has been made a sticky, about this same topic in one of the other forums here at this site. Why not search for it.

ok I found it for you.

http://codingforums.com/showthread.php?t=4437
no i meant, disable clicks IN the iframe. but im not going to do that, maybe.
i might, so it might be helpful to gain some information/knowledge...
i dont find anything on that thread that would block a right-click/left-click/any-click in an IFRAME.

teedoff
10-28-2010, 06:25 PM
no i meant, disable clicks IN the iframe. but im not going to do that, maybe.
i might, so it might be helpful to gain some information/knowledge...
i dont find anything on that thread that would block a right-click/left-click/any-click in an IFRAME.

Well this code here seems to block users from right clicking. Havent tested it but if thats all you want to do then try it out. I think you would have to put the code IN the iframe you want to manipulate.


Wanna bet?

enter this script into the head of your document


<SCRIPT LANGUAGE="Javascript"><!--
var isNS = (navigator.appName == "Netscape") ? 1 : 0;
var EnableRightClick = 0;
if(isNS)
document.captureEvents(Event.MOUSEDOWN||Event.MOUSEUP);
function mischandler(){
if(EnableRightClick==1){ return true; }
else {return false; }
}
function mousehandler(e){
if(EnableRightClick==1){ return true; }
var myevent = (isNS) ? e : event;
var eventbutton = (isNS) ? myevent.which : myevent.button;
if((eventbutton==2)||(eventbutton==3)) return false;
}
function keyhandler(e) {
var myevent = (isNS) ? e : window.event;
if (myevent.keyCode==96)
EnableRightClick = 1;
return;
}
document.oncontextmenu = mischandler;
document.onkeypress = keyhandler;
document.onmousedown = mousehandler;
document.onmouseup = mousehandler;
//-->
</script>

jeree
10-28-2010, 06:33 PM
Well this code here seems to block users from right clicking. Havent tested it but if thats all you want to do then try it out. I think you would have to put the code IN the iframe you want to manipulate.


Wanna bet?

enter this script into the head of your document


<SCRIPT LANGUAGE="Javascript"><!--
var isNS = (navigator.appName == "Netscape") ? 1 : 0;
var EnableRightClick = 0;
if(isNS)
document.captureEvents(Event.MOUSEDOWN||Event.MOUSEUP);
function mischandler(){
if(EnableRightClick==1){ return true; }
else {return false; }
}
function mousehandler(e){
if(EnableRightClick==1){ return true; }
var myevent = (isNS) ? e : event;
var eventbutton = (isNS) ? myevent.which : myevent.button;
if((eventbutton==2)||(eventbutton==3)) return false;
}
function keyhandler(e) {
var myevent = (isNS) ? e : window.event;
if (myevent.keyCode==96)
EnableRightClick = 1;
return;
}
document.oncontextmenu = mischandler;
document.onkeypress = keyhandler;
document.onmousedown = mousehandler;
document.onmouseup = mousehandler;
//-->
</script>
Ohh, okay yeah i was thinking that to put it in the iframe would be that simple? anyways, thanks. ima try it out soon.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum