Jump to content


Is there any way around?


4 replies to this topic

#1 creativelimits

    Young Padawan

  • Members
  • Pip
  • 22 posts

Posted 20 August 2005 - 07:09 AM

Hi,

Is there any ready made script available which will disallow right click on my web page with a Custom Message which i would like to pass when user hits right click.

I saw it somewhere long back which is a Stock Photography site..I think the purpose behind is to stop ppls. copying the pics?

Thnx.

#2 Av-

    I Feel Left Out

  • Members
  • PipPipPipPip
  • 1,971 posts
  • Gender:Male
  • Location:10 ft. below sea level

Posted 20 August 2005 - 07:33 AM

thats can easly be done with javascript, hold on ill look up the code for you

found it already, i used it in one of my sites :(

<script language=JavaScript>
<!--
var message="YOUR MESSAGE HERE";

///////////////////////////////////
function clickIE4(){
if (event.button==2){
alert(message);
return false;
}
}

function clickNS4(e){
if (document.layers||document.getElementById&&!document.all){
if (e.which==2||e.which==3){
alert(message);
return false;
}
}
}

if (document.layers){
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS4;
}
else if (document.all&&!document.getElementById){
document.onmousedown=clickIE4;
}

document.oncontextmenu=new Function("alert(message);return false")

// --> 
</script>

Edited by Avalanche, 20 August 2005 - 07:35 AM.


#3 creativelimits

    Young Padawan

  • Members
  • Pip
  • 22 posts

Posted 20 August 2005 - 08:51 AM

Hi Avalanche,

It works just perfectly... But is there way i can make it more stylish like putting the message in different color , font etc?

The box which appears looks really outdated :( ...

Or manipulate the whole Dialog box itself?

Thanks.

#4 Av-

    I Feel Left Out

  • Members
  • PipPipPipPip
  • 1,971 posts
  • Gender:Male
  • Location:10 ft. below sea level

Posted 20 August 2005 - 09:44 AM

im sure there is a way to do that, i just dont know how ^^, myabe somebody else here can help you

#5 creativelimits

    Young Padawan

  • Members
  • Pip
  • 22 posts

Posted 21 August 2005 - 02:53 AM

Hi,

Please have a look @ URL for Navigation

How i can achieve this kind of navigation? I am totally new to this so its really facinating to me rather than using crazy Photoshop layout and slicing it to form an HTML Page?

Thank you.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users