SitePoint Sponsor

User Tag List

Results 1 to 6 of 6

Hybrid View

  1. #1
    SitePoint Enthusiast
    Join Date
    Sep 2008
    Location
    EAST COAST
    Posts
    60
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Memorial site Javascript help

    http://www. sonnygunnz .com / woods/ pictures

    I want to have that animated gif at the bottom show up in an alert window, We dont want anyone trying to take anything we decide to add to the page.

    I know disable right click is old and outdated, But this is a memorial site not a profit site, or a site for the masses. It is for us. It will make alot of peoples day to see that anytime they try to right click.

    Code:
    <script type="text/javascript">
    <!--
    var image="http://www.sonnygunnz.com/images/woods.gif";
    
    var message="<?php echo $image; ?>";
    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>
    Can anyone tell me if this is even possible, Google search's say no. Ive heard I should try AJAX. Can someone please at least point me in the correct direction.

    Thank anyone who helps in advance

  2. #2
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,526
    Mentioned
    83 Post(s)
    Tagged
    3 Thread(s)
    Quote Originally Posted by kangbroke View Post
    I want to have that animated gif at the bottom show up in an alert window, We dont want anyone trying to take anything we decide to add to the page.
    Anything that you make publicly available is just that, it is public and it is available.

    There are certain techniques that you can use to let people know that you don't appreciate people copying your works, but you can not actually stop them, due to showing the information on a public web page.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  3. #3
    SitePoint Enthusiast
    Join Date
    Sep 2008
    Location
    EAST COAST
    Posts
    60
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by paul_wilkins View Post
    Anything that you make publicly available is just that, it is public and it is available.

    There are certain techniques that you can use to let people know that you don't appreciate people copying your works, but you can not actually stop them, due to showing the information on a public web page.
    Im completely aware of this, I have this 1 website which is a memorial site. My friend was murdered. His mom wanted me to code in this for her, I told her its not going to really stop anyone. She just wants it done.

    Im not trying to make it so nobody can steal it, I personally dont even see why she cares.

  4. #4
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,526
    Mentioned
    83 Post(s)
    Tagged
    3 Thread(s)
    What you've found out seems to be correct. It's not possible to show images in an alert window, only text.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  5. #5
    SitePoint Enthusiast
    Join Date
    Sep 2008
    Location
    EAST COAST
    Posts
    60
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by paul_wilkins View Post
    What you've found out seems to be correct. It's not possible to show images in an alert window, only text.
    Is it possible to achive what im going for using AJAX or jQuery

  6. #6
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,526
    Mentioned
    83 Post(s)
    Tagged
    3 Thread(s)
    Quote Originally Posted by kangbroke View Post
    Is it possible to achive what im going for using AJAX or jQuery
    Ajax is for requesting content from an external source. That won't be of any help for you here.

    About the best solution would be to use jQueryUI
    http://jqueryui.com/demos/dialog/#modal-message

    That way you can provide the dialog with any HTML content that you wish to display.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript


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
  •