oh .. I guess I could help answer your question, heh.

This is the JavaScript that opens a full screen window with most of the
stuff (except the scroll bars) disabled.


window.open(varURL,null,"directories=no,fullscreen=yes,location=no,menubar=n
o,resizable=no,scrollbars=yes,status=no,toolbar=no");

varURL is the URL to the file you want to open.  I'm sure you can see what's
going on and adjust things according to your needs.

The rest of this JavaScript code is used on the page that gets opened by the
code above.  It 'disables' all keyboard keys and mouse buttons (except for
the left click).

<SCRIPT LANGUAGE="JavaScript" TYPE="text/javascript">
<!--
// This function 'disables' key presses and any mouse click except for the
left one, and displays the appropriate message for each, if any.
    function secure() {
        alert("Message for key presses, if desired.");

        // This group of functions disable any mouse button except the left
one.
       var message="Message for mouse clicks, if desired.";

        function click(e) {
            if (document.all) {
                if (event.button != 1) {
                    alert(message);
                    return false;
                }
            }
            if (document.layers) {
                if (e.which != 1) {
                    alert(message);
                    return false;
                }
            }
        }

        if (document.layers) {
            document.captureEvents(Event.MOUSEDOWN);
        }

        document.onmousedown=click;
    }
//-->
</SCRIPT>

and this enables the JavaScript on the page:

    <body onkeydown="secure();">

I haven't tried it yet, but you might be able to get around a few
'workarounds' by changing Event.MOUSEDOWN to Event.MOUSEUP.  If it works, it
will negate the workaround that I posted below.

HTH

If you have any questions, let me know.  I have used this code to keep
students, who are using an online testing application, as honest as
possible.  It is currently in production and, judging by the pass/fail
ratio, it's working really well.  :)


Oh .. as a side question, this online testing application that I have
written has turned into a rather complex app, full of all kinds of
supporting pieces.  Does anyone know what kind of need there is for a
full-featured application of this type, or what someone might be looking for
in terms of functionality for something like this?  If it's moderate to
high, I'll rework it and make it as generic as possible.

Todd

----- Original Message -----
From: "Todd" <[EMAIL PROTECTED]>
To: "CF-Community" <[EMAIL PROTECTED]>
Sent: Tuesday, January 08, 2002 8:47 PM
Subject: Re: Content protection?


> You can do it in other versions as well.  Hold the mouse over the picture.
> Click and *hold* with the right mouse button.  While still holding the
right
> button down, left click on the OK to the message. While still holding the
> right button down, move the mouse back over the picture (if needed) and
> release the right button.  The right click menu will appear :)
>
> Todd
>
> ----- Original Message -----
> From: "Patrick Harkins" <[EMAIL PROTECTED]>
> To: "CF-Community" <[EMAIL PROTECTED]>
> Sent: Tuesday, January 08, 2002 8:26 PM
> Subject: Re: Content protection?
>
>
> > On that note, you should be aware that in IE 6 Beta, there is a feature
> > that allows you to save images that are right-click protected with
> > javascript.....  Oops!
> >
> > Patrick
> >
> > BTW hi there fellow Canandian! :)
> >
> >
> > At 04:09 PM 08/01/2002 -0500, you wrote:
> > >Hello All,
> > >
> > >We have a need to display some text on our intranet that a user would
not
> be
> > >able to print/copy. Would there be any scripts out there anyone can
point
> me
> > >to? I guess it will be a script that pops up the html file into a
window
> > >without any of the menu options with the right click disabled. I want
to
> > >also stop the user from highlighting the text and copying it using
> Ctrl+v.
> > >
> > >Another method I have thought of is displaying the text as an image in
a
> pop
> > >up screen with the menu and right click disabled. Has any one come
across
> > >such a tag that converts text to image on the fly?
> > >
> > >I understand that there will always be workarounds and it will never be
> > >foolproof.
> > >
> > >Thanks,
> > >
> > >Dharmesh Goel
> > >Programmer Analyst
> > >IT Dept. - Discount Car & Truck Rentals
> > >416-744-0123 x290
> > >
> >
> 
______________________________________________________________________
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to