Results 1 to 4 of 4

Thread: Disable right click on DHTML Window widget(v1.03)

  1. #1
    Join Date
    Oct 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Disable right click on DHTML Window widget(v1.03)

    1) Script Title:
    DHTML Window widget (v1.03)

    2) Script URL (on DD):
    http://www.dynamicdrive.com/dynamici...ndow/index.htm

    3) Describe problem:
    Control printing of DHTML window

    Firstly many thanks for this great script ! What I need to do though is to control who can print from the window by disabling the right click within the DHTML window.
    I have tried putting the code into the js file but I can only get it to fire when I right click on the title bar.

    Cheers,

    ron

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    http://www.dynamicdrive.com/forums/s...ad.php?t=21964
    See #1/2/4/5.

    You can't do that. For example, CTRL+P will get around it every time.

    websites have limited control through javascript intentionally, which is better for the user and not good for the web designer in some sense, though really not such a big deal.

    There have been a number of discussions on this type of thing, so look it up if you want to read and confirm.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  3. #3
    Join Date
    Oct 2007
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Hi Daniel,

    I appreciate that not everything will be bulletproof and that if someone really want to print they will find a workaround.

    What I am dealing with here is a non public application. For privacy reasons the users are not allowed to print certain documents. If I can open these in a DHTML window without right click functionality it will confirm to them that this is a non printable document.

    cheers,

    Ron

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Assuming for the moment that this has any chance of being a good thing if we get it working for you (I have my doubts - a private data stream that isn't allowed to be printed? Why bother providing the data?), I'm wondering how you get your content into the Widget? If it's via iframe, just put the no-right click code on the page in the iframe.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

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
  •