Click to See Complete Forum and Search --> : Can ANYONE help me and modify this script


ACSpyder
08-20-2003, 09:18 PM
Help!!!
I need a (No Right Click) script that will NOT go to a (Alert Box) but go straight to the (Add To Favorites Box). I have two scripts but I can't get them to work. I don't know why or what I'm doing wrong that it will not work. This is my first try at script. Here is one of them:

<script language=javascript>
function nrc(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)) {
window.external.AddFavorite('http://www.geocities.com/thepowerofgod','God's Promises');
return false;
}
return true;
}
document.onmousedown=nrc;
document.onmouseup=nrc;
if (document.layers) window.captureEvents(Event.MOUSEDOWN);
if (document.layers) window.captureEvents(Event.MOUSEUP);
window.onmousedown=nrc;
window.onmouseup=nrc;

</script>



This one needs a Doctor to fix it up.
Can you HELP? And YES, I did post this last week with no replies.

Exuro
08-21-2003, 01:58 AM
You know, I think your only problem was this line:

window.external.AddFavorite('http://www.geocities.com/thepowerofgod','God's Promises');

Notice how you have a nice little apostrophie right in the middle of that string. There are two ways you could fix this:

window.external.AddFavorite('http://www.geocities.com/thepowerofgod','God\'s Promises');

or

window.external.AddFavorite('http://www.geocities.com/thepowerofgod',"God's Promises");

ACSpyder
08-21-2003, 07:04 PM
Thanks Exuro,
I have worked with this script for two weeks!
That was the problem all a long and I didn't or couldn't see it.
[COLOR=red][SIZE=3][B][I][U]THANK YOU!