Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Silent no LEFT click

  1. #1
    Join Date
    Oct 2004
    Posts
    79
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Silent no LEFT click

    hello! you site help me out a lof with my owm site and understanding javascript!
    still I can't figure this out...
    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?


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

    greetz and thanx

  2. #2
    Join Date
    Aug 2004
    Location
    Brighton
    Posts
    1,563
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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
    Last edited by cr3ative; 10-31-2004 at 06:01 AM.
    A retired member, drop me a line through my site if you'd like to find me!
    cr3ative media | read the stickies

  3. #3
    Join Date
    Oct 2004
    Posts
    79
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Smile

    wow! I was not expecting such a fast anwser!
    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... but sure looks pointless when one sees it!

    thanx a lot!
    greetz!

  4. #4
    Join Date
    Aug 2004
    Location
    Brighton
    Posts
    1,563
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Be sure to post a link the finished site when you're done.
    I like seeing scripts in action

    cr3ative
    A retired member, drop me a line through my site if you'd like to find me!
    cr3ative media | read the stickies

  5. #5
    Join Date
    Oct 2004
    Posts
    79
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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!

    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?

  6. #6
    Join Date
    Aug 2004
    Location
    Brighton
    Posts
    1,563
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    "Is there a way to have a no right click script except in the links? "

    Not as far as I know.

    cr3ative
    A retired member, drop me a line through my site if you'd like to find me!
    cr3ative media | read the stickies

  7. #7
    Join Date
    Oct 2004
    Posts
    79
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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

  8. #8
    Join Date
    Aug 2004
    Location
    Brighton
    Posts
    1,563
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Yes, it looks good, almost like it's written in Flash.. well written.

    cr3ative
    A retired member, drop me a line through my site if you'd like to find me!
    cr3ative media | read the stickies

  9. #9
    Join Date
    Oct 2004
    Posts
    79
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    thanx took a lot of time.. thanx for all the help
    if you know a way to get the transparency done, please tell here

  10. #10
    Join Date
    Jul 2008
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default no left or right click for images only

    Can this be modified for images only? Thanks.

    Quote Originally Posted by cr3ative View Post
    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

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •