PDA

View Full Version : Silent no LEFT click



Gabber
10-30-2004, 08:18 PM
hello! you site help me out a lof with my owm site and understanding javascript! :)
still I can't figure this out... :mad:
I need a silent no LEFT click... (nope, I am not talking about right, but left click). I need one without an alert, just silent.
can you help me out? :confused:


ps: the better way would be to get a save as with left button script, but this is impossible right?

greetz and thanx :D

cr3ative
10-31-2004, 05:47 AM
This is quite possibly the most pointless script I've ever made :)
It is only verified to work in Internet Explorer.


Disable right and left click:
<SCRIPT LANGUAGE="JavaScript1.1">
function disable(mousebutton)
{
var message = "";
function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3||e.which==1) {(message);return false;}}}
if (document.layers)
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.onclick=clickIE;document.oncontextmenu=clickIE;}

return true;
}
document.onmousedown = disable;

</SCRIPT>


Disable only left click:

<SCRIPT LANGUAGE="JavaScript1.1">
function disable(mousebutton)
{
var message = "";
function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3||e.which==1) {(message);return false;}}}
if (document.layers)
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.onclick=clickIE;}

return true;
}
document.onmousedown = disable;

</SCRIPT>


Disable only right-click

<SCRIPT LANGUAGE="JavaScript1.1">
function disable(mousebutton)
{
var message = "";
function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3||e.which==1) {(message);return false;}}}
if (document.layers)
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}

return true;
}
document.onmousedown = disable;

</SCRIPT>


This damned messageboard's software puts random spacers in my script, even when its in CODE tags. If you see spaces in the script that are obviously incorrectly placed, remove them. Cheers.

cr3ative

Gabber
10-31-2004, 10:21 AM
wow! I was not expecting such a fast anwser! :D
This site rules... I will try to apply the script and then I'll post here my original intention... :)

"This is quite possibly the most pointless script I've ever made "

if what I want works out it will be nice... :D but sure looks pointless when one sees it! :D

thanx a lot!
greetz!

cr3ative
10-31-2004, 10:37 AM
Be sure to post a link the finished site when you're done.
I like seeing scripts in action :)

cr3ative

Gabber
10-31-2004, 11:24 AM
I took the spaces out (if not the script would not work of course) and...
well, after a few trouble I could integrate the two script the way I wanted it! :D

and here it is (hope you like it)

http://gabber.no.sapo.pt/dvideos.htm

unfortunaly, the transparency and other effects don't work with scrollbar color configuration. I dunno why, but they don't. I discovered this myself and already mailed the author. do u know how can I fix this?

other thing... is there a way to have a no right click script except in the links? :)

cr3ative
10-31-2004, 11:27 AM
"Is there a way to have a no right click script except in the links? "

Not as far as I know.

cr3ative

Gabber
10-31-2004, 11:29 AM
what did you think of the site (it's just a portion of the site)... the whole site is in www.thunderdome.web.pt - and it's now in the halloween intro version lol

cr3ative
10-31-2004, 11:38 AM
Yes, it looks good, almost like it's written in Flash.. well written.

cr3ative

Gabber
10-31-2004, 11:55 AM
thanx :) took a lot of time.. thanx for all the help
if you know a way to get the transparency done, please tell here :)

swimmyz
07-31-2008, 07:25 PM
Can this be modified for images only? Thanks.


This is quite possibly the most pointless script I've ever made :)
It is only verified to work in Internet Explorer.


Disable right and left click:
<SCRIPT LANGUAGE="JavaScript1.1">
function disable(mousebutton)
{
var message = "";
function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3||e.which==1) {(message);return false;}}}
if (document.layers)
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.onclick=clickIE;document.oncontextmenu=clickIE;}

return true;
}
document.onmousedown = disable;

</SCRIPT>


This damned messageboard's software puts random spacers in my script, even when its in CODE tags. If you see spaces in the script that are obviously incorrectly placed, remove them. Cheers.

cr3ative

maisie123
09-07-2008, 04:59 AM
This is quite possibly the most pointless script I've ever made :)
It is only verified to work in Internet Explorer.


Disable right and left click:
<SCRIPT LANGUAGE="JavaScript1.1">
function disable(mousebutton)
{
var message = "";
function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3||e.which==1) {(message);return false;}}}
if (document.layers)
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.onclick=clickIE;document.oncontextmenu=clickIE;}

return true;
}
document.onmousedown = disable;

</SCRIPT>


Disable only left click:

<SCRIPT LANGUAGE="JavaScript1.1">
function disable(mousebutton)
{
var message = "";
function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3||e.which==1) {(message);return false;}}}
if (document.layers)
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.onclick=clickIE;}

return true;
}
document.onmousedown = disable;

</SCRIPT>


Disable only right-click

<SCRIPT LANGUAGE="JavaScript1.1">
function disable(mousebutton)
{
var message = "";
function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3||e.which==1) {(message);return false;}}}
if (document.layers)
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}

return true;
}
document.onmousedown = disable;

</SCRIPT>


This damned messageboard's software puts random spacers in my script, even when its in CODE tags. If you see spaces in the script that are obviously incorrectly placed, remove them. Cheers.

cr3ative

hi. i used the above code and it worked.However, the links stopped working.what i mean is, the link can not be clicked. Is there a code to enable the links to work but disable left click at the same time?