[QUOTE=itsme3;23435]hi guys,
i am asking this question specifically this time because i tried hardly to add this small function to my scriptcase application (form and grid) but failed, i don’t know exactly where to put the code or if i am using the correct code or not, please help in telling me the steps required for me to make the right click disabled (without a message) in all applications that i do with sc, i would like some details, because all java resources sites says something like this: put this in the header, put this in the body, put this in the footer…etc but in sc it is not easy to determine and follow that exactly, so anybody could do that please advise, thanks in advanced
Mike[/QUOTE]
Tools->Layouts->Templates
Choose template you are using (example, light) and add this code at top.
<script language=JavaScript>
<!--
//Disable right mouse click Script
//By Maximus (maximus@nsimail.com) w/ mods by DynamicDrive
//For full source code, visit http://www.dynamicdrive.com
var message="Function Disabled!";
///////////////////////////////////
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>
Save templae with other name (to not overwrite base theme).
Tools->Express Edit
Choose All - Next
Apply to all applications + Template- Next
Model for Header-> Yes + Public + NameOfYourTemplate
Apply
Generate all youre apps again.
