How to Join Member's Area Private Library Search Today's Topics p Login
Main Forums Discussion Tech Talk Mature Content Archives
   Nav Win
 Tech Talk
 How Do You Spell HTML?
 Java script
 1 2 3 4
Follow us on Facebook

 Moderated by: Ron   (Admins )

 
User Options
Format for Better Printing EMail to a Friend Not Available
Admin Print Send ECard
Passions in Poetry

Java script

 Post A Reply Post New Topic   Go to the Next Oldest/Previous Topic Return to Topic Page Go to the Next Newest Topic 
WhtDove
Member Rara Avis
since 07-22-99
Posts 9561
Illinois


0 posted 04-14-2001 10:40 AM       View Profile for WhtDove   Email WhtDove   Edit/Delete Message      Find Poems   Click to visit WhtDove's Home Page   View IP for WhtDove

Does someone know the code for no right click?

please  
Christopher
Moderator
Member Rara Avis
since 08-02-99
Posts 9130
Purgatorial Incarceration


1 posted 04-15-2001 06:01 AM       View Profile for Christopher   Email Christopher   Edit/Delete Message      Find Poems  View IP for Christopher

Depending on what you want it for Becca - here it is. Remember that it has limited use - a) people without scripting ability, or with scripting turned off will bypass this, and anyone can gain access to your page info by viewing sorce through their top menu.  

I skipped ahead in my reading to put this together, and it works.. but there may definitely be better ways to do it... not as sloppy you know!   If there is, I'd like to know!

Peace,

C

Insert the following into the head of your document and modify the phrase o fit what you want...

<script language="JavaScript">
<!--Begins script function parameters
function nope(e) {
//are they using Netscape?
if (navigator.appName == 'Netscape' &&
(e.which == 3 || e.which == 2))
//if yes, then don't tell em anything, just block it!
return false
//if not NEtscape, then IE?
else if (navigator.appName == 'Microsoft Internet Explorer' &&
(event.button == 2 || event.button == 3)) {
//if yes, then tell em whatcha think!
alert("Not a chance Buster!")
return false }
return true }
//end function paramaters
//invoke function
document.onmousedown=nope
document.onmouseup=nope
if (document.layers) window.captureEvents(Event.MOUSEDOWN)
if (document.layers) window.captureEvents(Event.MOUSEUP)
window.onmousedown=nope
window.onmouseup=nope
//end da script-->
</script>
WhtDove
Member Rara Avis
since 07-22-99
Posts 9561
Illinois


2 posted 04-15-2001 10:22 AM       View Profile for WhtDove   Email WhtDove   Edit/Delete Message      Find Poems   Click to visit WhtDove's Home Page   View IP for WhtDove

Chris I have to put all this up like you have it here????

It's not the source I'm worried about. It's some of the graphics. I know they can still get them from other ways, but it will stop those who are too lazy to do it.  

Here's what I found on a site, but not sure if this was all of it or not.

<!-- // no rightclick script v.2.5

var message="happy surfing" // Message for the alert box
var message2="blah blah"// Don't edit below!
function click(e){
if (document.all){
if (event.button==2){
alert (message);
alert (message2);
return false;
}
}
if (document.layers){
if (e.which ==3){
alert (message);
alert (message2);
return false;
}
}
}
if (document.layers){
document.onmouse down=click;
// -->
</script>


geez...if things work out, I guess I'll learn this stuff in the fall, but that seems like a lot of junk, just to say no, ya know? LOL

Thanks Chris.....
Ron
Administrator
Member Rara Avis
since 05-19-99
Posts 9708
Michigan, US


3 posted 04-15-2001 12:02 PM       View Profile for Ron   Email Ron   Edit/Delete Message      Find Poems   Click to visit Ron's Home Page   View IP for Ron

You might want to reconsider, Becky.

There are some things on the Internet that people feel very strongly about, like Spam or opening a zillion popup windows. This is one of them. Right-click is used for a LOT of things besides saving images. When you disable something on my computer, for whatever justification, you are overstepping your boundaries. Kinda like inviting someone into your home, and then handcuffing their hands behind their back.

If you don't want people saving graphics, don't put them on your web site. If you do put them on your web site, assume people are going to smart enough to turn off JavaScript to get them. Because disabling the right-click irritates the good guys without even slowing down the bad ones.

IMHO  
WhtDove
Member Rara Avis
since 07-22-99
Posts 9561
Illinois


4 posted 04-15-2001 08:16 PM       View Profile for WhtDove   Email WhtDove   Edit/Delete Message      Find Poems   Click to visit WhtDove's Home Page   View IP for WhtDove

Point well taken Ron. Thanks, guess I'll just leave it as is.  
WhtDove will be notified of replies
 Post A Reply Post New Topic   Go to the Next Oldest/Previous Topic Return to Topic Page Go to the Next Newest Topic 
All times are ET (US) Top
  User Options
>> Tech Talk >> How Do You Spell HTML? >> Java script Format for Better Printing EMail to a Friend Not Available
Print Send ECard

 

pipTalk Home Page | Main Poetry Forums

How to Join | Member's Area / Help | Private Library | Search | Contact Us | Today's Topics | Login
Discussion | Tech Talk | Archives | Sanctuary



© Passions in Poetry and netpoets.com 1998-2013
All Poetry and Prose is copyrighted by the individual authors