Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 21

Thread: Disabeling "save Page As"

  1. #11
    BawA's Avatar FST Pioneer BT Rep: +1
    Join Date
    Jun 2003
    Location
    Some Where but not here
    Age
    41
    Posts
    4,213
    is there any disablign right click script without error box, i mean i dont want the error box to show up, simply just disable right click.

    Code:
    <script language="JavaScript1.2">
    
    var clickmessage="Right click disabled on images!"
    
    function disableclick(e) {
    if (document.all) {
    if (event.button==2||event.button==3) {
    if (event.srcElement.tagName=="IMG"){
    alert(clickmessage);
    return false;
    }
    }
    }
    else if (document.layers) {
    if (e.which == 3) {
    alert(clickmessage);
    return false;
    }
    }
    else if (document.getElementById){
    if (e.which==3&&e.target.tagName=="IMG"){
    alert(clickmessage)
    return false
    }
    }
    }
    
    function associateimages(){
    for(i=0;i<document.images.length;i++)
    document.images[i].onmousedown=disableclick;
    }
    
    if (document.all)
    document.onmousedown=disableclick
    else if (document.getElementById)
    document.onmouseup=disableclick
    else if (document.layers)
    associateimages()
    </script>
    This is wat i use, is there any way to remove error box it that?


    "You can be mad as a mad dog at the way things went; you can swear and curse the fates, but when it comes to the end, you have to let go"
    Benjamen button

  2. Internet, Programming and Graphics   -   #12
    Originally posted by 2nd gen noob@10 May 2004 - 00:57
    I.am, I read your guide, it's pretty good

    I'd like to think I was fluent in HTML coding, but I can't seem to get the "INVISIBLE" tags to work...can you give me any help or advice on how to use them, please?
    <INVISIBLE> tags work on the client side. Dont worry about it, it will be invisible at the client side.

    Whats up with the old screennames coming to life again? Are we having midlife-forum crisis?
    <span style='color:black'> I am a part of all that I have met - Lord Tennyson</span>
    <span style='color:blue'>Try not to let your mind wander...it is too small and fragile to be out by itself</span>

  3. Internet, Programming and Graphics   -   #13
    Originally posted by I.am+10 May 2004 - 09:32--></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td>QUOTE (I.am @ 10 May 2004 - 09:32)</td></tr><tr><td id='QUOTE'> <!--QuoteBegin-2nd gen noob@10 May 2004 - 00:57
    I.am, I read your guide, it&#39;s pretty good

    I&#39;d like to think I was fluent in HTML coding, but I can&#39;t seem to get the "INVISIBLE" tags to work...can you give me any help or advice on how to use them, please?
    <INVISIBLE> tags work on the client side. Dont worry about it, it will be invisible at the client side.

    Whats up with the old screennames coming to life again? Are we having midlife-forum crisis? [/b][/quote]
    Ah, right. I asked a friend and he said that there&#39;s no such thing as the "INVISIBLE" tag. What a dumbass&#33;

    I&#39;m getting amphoteric88 and 2nd gen noob up to 999 posts, cos that&#39;s a nicer number than the 778 they were on before

  4. Internet, Programming and Graphics   -   #14
    Yeah, noobs these days dont know much about html. Maybe you can teach him now a thing or two

    999 is a good idea (1 post before senior member), 666 sounds interesting too :
    <span style='color:black'> I am a part of all that I have met - Lord Tennyson</span>
    <span style='color:blue'>Try not to let your mind wander...it is too small and fragile to be out by itself</span>

  5. Internet, Programming and Graphics   -   #15
    Originally posted by bawa@Klite_user@10 May 2004 - 09:00
    is there any disablign right click script without error box, i mean i dont want the error box to show up, simply just disable right click.

    Code:
    &#60;script language=&#34;JavaScript1.2&#34;&#62;
    
    var clickmessage=&#34;Right click disabled on images&#33;&#34;
    
    function disableclick&#40;e&#41; {
    if &#40;document.all&#41; {
    if &#40;event.button==2||event.button==3&#41; {
    if &#40;event.srcElement.tagName==&#34;IMG&#34;&#41;{
    alert&#40;clickmessage&#41;;
    return false;
    }
    }
    }
    else if &#40;document.layers&#41; {
    if &#40;e.which == 3&#41; {
    alert&#40;clickmessage&#41;;
    return false;
    }
    }
    else if &#40;document.getElementById&#41;{
    if &#40;e.which==3&&e.target.tagName==&#34;IMG&#34;&#41;{
    alert&#40;clickmessage&#41;
    return false
    }
    }
    }
    
    function associateimages&#40;&#41;{
    for&#40;i=0;i&#60;document.images.length;i++&#41;
    document.images&#91;i&#93;.onmousedown=disableclick;
    }
    
    if &#40;document.all&#41;
    document.onmousedown=disableclick
    else if &#40;document.getElementById&#41;
    document.onmouseup=disableclick
    else if &#40;document.layers&#41;
    associateimages&#40;&#41;
    &#60;/script&#62;
    This is wat i use, is there any way to remove error box it that?
    I do not agree with it but here you go. It should work. Put in the <head> section.

    Code:
    &#60;script language=JavaScript&#62;
    &#60;&#33;--
    
    function clickIE4&#40;&#41;{
    if &#40;event.button==2&#41;{
    return false;
    }
    }
    
    function clickNS4&#40;e&#41;{
    if &#40;document.layers||document.getElementById&&&#33;document.all&#41;{
    if &#40;e.which==2||e.which==3&#41;{
    return false;
    }
    }
    }
    if &#40;document.layers&#41;{
    document.captureEvents&#40;Event.MOUSEDOWN&#41;;
    document.onmousedown=clickNS4;
    }
    else if &#40;document.all&&&#33;document.getElementById&#41;{
    document.onmousedown=clickIE4;
    }
    document.oncontextmenu=new Function&#40;&#34;return false&#34;&#41;
    // --&#62; 
    &#60;/script&#62;

  6. Internet, Programming and Graphics   -   #16
    BawA's Avatar FST Pioneer BT Rep: +1
    Join Date
    Jun 2003
    Location
    Some Where but not here
    Age
    41
    Posts
    4,213
    Thanks the script worked but u disabled right click for everything, in orginal script it just disables right click on images.
    can u set it so it disables right click only for images.


    "You can be mad as a mad dog at the way things went; you can swear and curse the fates, but when it comes to the end, you have to let go"
    Benjamen button

  7. Internet, Programming and Graphics   -   #17
    This kind of works

    Code:
    &#60;script language=&#34;JavaScript1.2&#34;&#62;
    
    
    function disableclick&#40;e&#41; {
    if &#40;document.all&#41; {
    if &#40;event.button==2||event.button==3&#41; {
    if &#40;event.srcElement.tagName==&#34;IMG&#34;&#41;{
    document.oncontextmenu=new Function&#40;&#34;return false&#34;&#41;
    return false;
    }
    }
    }
    else if &#40;document.layers&#41; {
    if &#40;e.which == 3&#41; {
    document.oncontextmenu=new Function&#40;&#34;return false&#34;&#41;
    return false;
    }
    }
    else if &#40;document.getElementById&#41;{
    if &#40;e.which==3&&e.target.tagName==&#34;IMG&#34;&#41;{
    document.oncontextmenu=new Function&#40;&#34;return false&#34;&#41;
    return false
    }
    }
    }
    
    function associateimages&#40;&#41;{
    for&#40;i=0;i&#60;document.images.length;i++&#41;
    document.images&#91;i&#93;.onmousedown=disableclick;
    }
    if &#40;document.all&#41;
    document.onmousedown=disableclick
    else if &#40;document.getElementById&#41;
    document.onmouseup=disableclick
    else if &#40;document.layers&#41;
    associateimages&#40;&#41;
    &#60;/script&#62;

  8. Internet, Programming and Graphics   -   #18
    Again, as even Ariel knows it wont stop anything other than nothing will happen on right click for really noob users.

    Anyone can "View Source" from the menu and get the images names and then access it directly.

    I use myie2 as well which just enables right click in any website.

    & really all one has to do is disable javascripts to block all your fuctions and use freely.

    Its really lame and annoying to users&#33; I still say, dont do it&#33; Keep it clean&#33;
    <span style='color:black'> I am a part of all that I have met - Lord Tennyson</span>
    <span style='color:blue'>Try not to let your mind wander...it is too small and fragile to be out by itself</span>

  9. Internet, Programming and Graphics   -   #19
    I can still see your source code&#33;&#33; LOL&#33; All I do is go to View > Source and there it is&#33; I don&#39;t see the point in disable right click script, and have never used it. It has to be one of the most pointless scripts ever written, in my humble opinion&#33;

  10. Internet, Programming and Graphics   -   #20
    BawA's Avatar FST Pioneer BT Rep: +1
    Join Date
    Jun 2003
    Location
    Some Where but not here
    Age
    41
    Posts
    4,213
    as "I.am" said, notting is perfict using that script will help little bit for example thoes who dont know much about scripts and ways to get around that script will be usefull.


    "You can be mad as a mad dog at the way things went; you can swear and curse the fates, but when it comes to the end, you have to let go"
    Benjamen button

Page 2 of 3 FirstFirst 123 LastLast

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
  •