www.webdeveloper.com
Page 1 of 2 12 LastLast
Results 1 to 15 of 16

Thread: Open a new window with right-click protection?

  1. #1
    Join Date
    May 2003
    Posts
    7

    Open a new window with right-click protection?

    I need a script that upon clicking a thumbnail will open a new window with right-click protection. I know its hardly effective, but it will make the person I'm doing the site for happy. This is a photography site.

  2. #2
    Join Date
    May 2003
    Location
    Philly
    Posts
    69
    Just put this code into the <head> section of the pop-up window doc:

    <script language="JavaScript">
    <!--
    document.oncontextmenu = function(){return false}
    //-->
    </script>

  3. #3
    Join Date
    May 2003
    Posts
    7

    hmmmm

    That I know. I need to create a page with that protection and the full size image when the thumbnail is clicked. Okay, let me try this.....

    1. Click on the thumbnail.
    2. Image will open in a new window. That window needs to be protected with that code.

    I want a script to do all that. Can you apply the protection script to that idea?

  4. #4
    Join Date
    Dec 2002
    Location
    High on life
    Posts
    10,104
    This thread might be of interest to you... http://forums.webdeveloper.com/showt...&threadid=8550 a no-rightclick script could easily be added...

    Personal website http://www.ryanbrill.com/
    Business website: http://www.infinitywebdesign.com/
    TypeSpace http://www.typespace.org/

    I reject your reality and substitute it with my own!

  5. #5
    Join Date
    May 2003
    Posts
    7

    fdsafdsa

    I was hoping someone could help me with that part. I have the protection script. I know how to open a window with a click. But I need that window to be automatically protected when its opened.

  6. #6
    Join Date
    Jan 2003
    Location
    Peg City
    Posts
    638
    And here's a no-right click script for NS4+ and IE4+ (doesn't work for Opera 7 though)

    http://www.dynamicdrive.com/dynamicindex9/noright.htm

    havik

  7. #7
    Join Date
    May 2003
    Posts
    18
    Just give oncontextmenu="return false" within your body tag of your window page .

    Now you will have your window popping out, already with Right-Click Protection.

    Cheers,
    - Keshav

  8. #8
    Join Date
    May 2003
    Location
    Between Baltimore and DC
    Posts
    3,579
    If the code you are using is opening the new window that does not contain html, but just the pic, then you are going to have to change the script.

    You would have to dynamically write the code to the new window....

    Would do something like this

    Example Link

    There is another method I use too and that is query strings with a templete page.

    A1ien51

  9. #9
    Join Date
    May 2003
    Posts
    7

    fdsafdjklsakl;jfdjk;l

    Right. I know that. How do I do it? Can someone show me how to accomplish this?

  10. #10
    Join Date
    Dec 2002
    Location
    High on life
    Posts
    10,104
    I edited my post above to actually include the link to the thread that should help you. You said you know how to include a no-rightclick script on a page, so all you should need to do is add it to either my method, or Dave Clark's

    Personal website http://www.ryanbrill.com/
    Business website: http://www.infinitywebdesign.com/
    TypeSpace http://www.typespace.org/

    I reject your reality and substitute it with my own!

  11. #11
    Join Date
    May 2003
    Posts
    7

    fdsafdsafdsa

    I understand how Alien51's code works. Its driven by a form. But how can I change it so that I don't need the form. I want the click of the thumbnail to open the corresponding full size image. I think I figured out how to put my protection script in page generation section, so that should be okay.

    I GREATLY appreciate everyone's assistance. Thanks mucho.

  12. #12
    Join Date
    May 2003
    Posts
    7
    I've tried to understand this all, but I'm confused, and this is way to indepth for me. I'll take the old fashioned road, and use some HTML pages for all the pics. It'll take forever, but I'm having a way hard time with this. Thanks for your help.

  13. #13
    Join Date
    Dec 2002
    Location
    High on life
    Posts
    10,104
    Did you try the code in the thread that I linked to? If you still haven't gotten that to work, post what you tried (as far as adding a no-rightclick script) and we can help you along...

    Personal website http://www.ryanbrill.com/
    Business website: http://www.infinitywebdesign.com/
    TypeSpace http://www.typespace.org/

    I reject your reality and substitute it with my own!

  14. #14
    Join Date
    Dec 2002
    Location
    High on life
    Posts
    10,104
    If you are still interested, I wrote this research page: http://www.infinitypages.com/research/imagepopup.htm Perhaps it will help you along...

    Personal website http://www.ryanbrill.com/
    Business website: http://www.infinitywebdesign.com/
    TypeSpace http://www.typespace.org/

    I reject your reality and substitute it with my own!

  15. #15
    Join Date
    May 2003
    Posts
    7

    Awesome!!!

    Dude, I'm golden now. Thanks so much. Pyro, you da man!!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles