How to disable rightclick

thulasiram

Beta member
Messages
1
I am loading a website in an iframe. I am in a condition that i have to disable the rightclick on the iframe after the page has been loaded.
Please help me for this situation.
 
Put this in the HTML
Code:
<script>
    function click(e) 
    {
        if (event.button == 2) 
        {
             alert("no Right Clicking Allowed!!!");
	return false;
        }
    }
document.onmousedown=click;
</script>
 
Haha - nobody likes Alerts anyway. You have to move the mouse up and across and press Ok, or move your hands to press enter. Its inconvenient.

However Devil Hack :D The forum can't really allow disrespectful language structure like that anymore. We have too many members now to allow it otherwise it gets seriously out of hand.
 
I only put the alert in as an example that actions could be taken in the subfunction, I didn't think it was too bad considering I wrote it off the top of my head...
 
Lord Kalthorn said:
Haha - nobody likes Alerts anyway. You have to move the mouse up and across and press Ok, or move your hands to press enter. Its inconvenient.

However Devil Hack :D The forum can't really allow disrespectful language structure like that anymore. We have too many members now to allow it otherwise it gets seriously out of hand.
LOL okay i'll behave.
 
Back
Top Bottom