Hello,
Can someone please provide a script that will just present a copyright
warning message in any browser, when someone right clicks.
Thanks.
Hello,
Can someone please provide a script that will just present a copyright
warning message in any browser, when someone right clicks.
Thanks.
Not really a good idea. Your original material is copyrighted. If you suffer any significant harm through your copyrights being violated, you may sue. This is all the protection you need. If you want folks put on notice, post a copyright notice on the page. A right click script will be missed in many browsers and can cause problems with your page(s).
- John________________________
Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
If I were trying to steal something from a page, I'd just use Safari (the browser I happen to be using at the moment). I have yet to see a no right click script that works for it. It may be quite possible, but just haven't come across one that has that coded into it.
Shouldn't be that hard to make that pop up if you want it, though.
The javascript for it would be something like:
<... onClick="alert('© 2006 Something.com')">
Just apply that to where the alert pops up in the javascript you are using.
*Not sure if © works in javascript. In fact, I suspect it doesn't. Not sure how you'd display a copyright symbol in JS, then.
Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
No it doesn't. UseAnd that will be kinda annoying.Code:©
Peter - alotofstuffhere[dot]com - Email Me - Donate via PayPal - Got spare hardware? Donate 'em to me :) Just send me a PM.
Currently: enjoying the early holidays :)Read before posting: FAQ | What you CAN'T do with JavaScript | Form Rules | Thread Title Naming Guide
It depends upon the situation, in an alert string:
Code:\xa9
- John________________________
Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
Interest. What is that? (By name... what type of character naming is it?)
Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
I really am not sure of the precise technical name. It is the 2 digit ASCII hex value of the character preceded by the special character \x. If you want to use the 4 digit Unicode value, precede it with \u - for © that's:
Unicode is the same as ASCII (just add the two 0's to make it 4 hex value digits) until you get above two hex digits being required to express the character's value and can therefore be used for many more characters if the user agent can display them.Code:\u00a9
- John________________________
Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
It doesn't, but in the example you posted, it's also an HTML attribute, and will be parsed as such before being passed to the JS interpreter.*Not sure if © works in javascript. In fact, I suspect it doesn't. Not sure how you'd display a copyright symbol in JS, then.
Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!
- John________________________
Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate
Right. I know it's not technically 'javascript', but I know that alerts behave differently than standard html, so I called it JS.
Thanks for the info, John.
Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum
Bookmarks