Any brilliant webmasters in the house?

Discussion in 'Et Cetera, Et Cetera' started by MisterMark, Aug 28, 2004.

  1. MisterMark

    Gold Member

    Joined:
    Oct 6, 2002
    Messages:
    2,090
    Albums:
    1
    Likes Received:
    5
    Gender:
    Male
    Location:
    Palm Springs, CA
    I want to force visitors to download the video clips on this page, rather than simply left-clicking them:

    http://www.extremecock.com/gagthefag.htm

    Visitors will often visit over and over again, left-clicking because it's the easier thing to do, but it eats up a lot of my bandwidth when they do that. If I force them to save it to their computers, that should cut down at least a little bit on the bandwidth issue.

    I know how to disable left (or right) clicking on an entire page, but not on specific links.

    Thanks to anyone who can help me out.
     
  2. jonb

    Gold Member

    Joined:
    Oct 5, 2002
    Messages:
    8,308
    Likes Received:
    2
    The easiest way is to use a compressor such as StuffIt or ZipIt. Unfortunately, you'll have to include two copies, one for Windows and one for Mac. When they click on it, they get to choose between saving the compressed file or extracting its contents to a regular folder.
     
  3. ponybilt

    ponybilt Member

    Joined:
    May 25, 2004
    Messages:
    511
    Albums:
    1
    Likes Received:
    7
    Gender:
    Male
    Location:
    Chicago
    Hey, Mark.

    Do you have HitBox or another tracking tool that shows how many repeat visitors are looking at the vid? It may not be as many as you suspect, but if you're intent on making people download it without requiring additional software (I still hear a lot of people saying they can't open zipped files), then make them go to another page to download it --and from that page, you can disable the left click.

    There are other options as well, but it's waaay late and capacity is breaking down :p
     
  4. HappySucks

    HappySucks New Member

    Joined:
    May 10, 2004
    Messages:
    33
    Likes Received:
    0
    Location:
    Tampa
  5. Britannic

    Gold Member

    Joined:
    Jun 1, 2004
    Messages:
    69
    Albums:
    1
    Likes Received:
    14
    Gender:
    Male
    Location:
    Wappingers Falls, NY
    The following code should, it's been a while since I used it, disable right-clicks in IE and Netscape.

    Code:
    <script language=JavaScript>
    <!--
    
    var message="Right-Click Disabled!";
    
    function clickIE4() {
     if (event.button==2) {
      alert(message);
      return false;
     }
    }
    
    function clickNS4(e) {
     if (document.layers||document.getElementById&&!document.all) {
      if (e.which==2||e.which==3) {
       alert(message);
       return false;
      }
     }
    }
    
    if (document.layers) {
      document.captureEvents(Event.MOUSEDOWN);
      document.onmousedown=clickNS4;
    }
    else if (document.all&&!document.getElementById) {
     document.onmousedown=clickIE4;
    }
    
    document.oncontextmenu=new Function("alert(message);return false")
    
    </script>
    
     
  6. HappySucks

    HappySucks New Member

    Joined:
    May 10, 2004
    Messages:
    33
    Likes Received:
    0
    Location:
    Tampa
    Britannic

    It doesn't work in FireFox - FireFox has the option to still view from source as well as a few other browsers
     
  7. Britannic

    Gold Member

    Joined:
    Jun 1, 2004
    Messages:
    69
    Albums:
    1
    Likes Received:
    14
    Gender:
    Male
    Location:
    Wappingers Falls, NY
    Oh well. Like I said, it should work for IE and Netscape. I'm sure there's a way to tweak the script to work withing FireFox but I'm not sure how since I don't use it and don't know what javascript commands it supports, etc. Feel free to take the ball and run with it, if you can. :)
     
  8. MisterMark

    Gold Member

    Joined:
    Oct 6, 2002
    Messages:
    2,090
    Albums:
    1
    Likes Received:
    5
    Gender:
    Male
    Location:
    Palm Springs, CA
    Wow - there ARE brilliant webmasters here! Thanks for all of your help.

    Pony, I think your solution is probably the simplest - and it will definitely work. I like that! ;) Thanks for the idea.

    HappySucks, that's a really cool script. I'll give it a try - hopefully I can figure out how it works.
     
  9. jonb

    Gold Member

    Joined:
    Oct 5, 2002
    Messages:
    8,308
    Likes Received:
    2
    Well, it works in Opera, but Opera forces you to download anyway.
     
Draft saved Draft deleted