Find jobs - Free All Ebook PDF Download - Manga - Debt Consolidation - Find jobs

PDA

View Full Version : How the Heck do I remove this script!


classifiedsrealtor
Feb 13th 2007, 7:32 am
Can someone please tell me how I can either delete this script from my site or modify it so that I can allow the site users to cut and paste on my site. The script below is embedded in a few of the pages in my site and disables anyone from right clicking and copying my site. It is a real pain for anyone who is trying to paste their listings and info into my site.

If I delete the script or try and modify it then any other .PHP that is parsed on my site goes bananas with error messages like this one:

warning:[function.main] failed to open stream. no such file or in directory/home.php on line 43

This is the script in question:

<SCRIPT LANGUAGE="JavaScript1.1">
<!-- Begin
function right(e) {
if (navigator.appName == 'Netscape' &&
(e.which == 3 || e.which == 2))
return false;
else if (navigator.appName == 'Microsoft Internet Explorer' &&
(event.button == 2 || event.button == 3)) {
alert("Sorry Pal, Permission Disallowed !");
return false;
}
return true;
}
document.onmousedown=right;
document.onmouseup=right;
if (document.layers) window.captureEvents(Event.MOUSEDOWN);
if (document.layers) window.captureEvents(Event.MOUSEUP);
window.onmousedown=right;
window.onmouseup=right;
// End -->
</script>

Thank you for your assistance..

ajsa52
Feb 13th 2007, 12:02 pm
Try replacing the line just below "Begin"

function right(e) {

with this two lines:

function right(e) { return true; }
function oldright(e) {

classifiedsrealtor
Feb 13th 2007, 3:04 pm
Ajsa52- Thank you for the suggestion but it didn't work.

Why is it I can delete any other java script from the code in my site except for the one in question? This is really odd and frustrating.:confused:

ajsa52
Feb 13th 2007, 4:05 pm
If your problem is with modifying a PHP script, maybe you should start a new thread on PHP forum: http://forums.digitalpoint.com/forumdisplay.php?f=37.

But maybe it's a file attributes problem. Try setting 777 attributes on PHP file with that javascript code.
Then you should be able to modify that file.

classifiedsrealtor
Feb 13th 2007, 5:43 pm
This is the script in question:
[B]<SCRIPT LANGUAGE="JavaScript1.1">


That is definitely a javascript I am talking about but yes when I modify or delete the script it disrupts the other PHP files from parsing on the page the script is on.

I figured the best forum to talk about javascript would be in the java forum but maybe I am breaking a PHP loop so yes possibly a question for someone who knows about embedding java in PHP.;)

Anyways, if anyone has any ideas on how to remove this script from my site code please do tell..thanks