Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / JScript / October 2004

Tip: Looking for answers? Try searching our database.

Disabling alt tab on a web page

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
E43509 - 08 Oct 2004 14:25 GMT
I have an aspx application that provides online testing.  The customer wants
to disallow the student from hitting certain keystrokes like ALT-TAB, or
PrintScrn, or CTRL-C so that they cannot take a copy of the test question and
paste it into another document.  Or use ALT-TAB to get back to the desktop to
look up answers.
I launch IE full screen no toolbars to give it the appearance that you are
sort of locked down.  Is there a way using script on the web page to capture
certain keystrokes and not allow them to be sent to the OS?
EradicusMax - 20 Oct 2004 06:09 GMT
Yes, the onKeyPress event handler can do what you want.
Attach to the body, element etc., below handles the ctrl+C
MyKeyPress()
{
   if(event.keyCode==67 && event.ctrlKey)
   {
       event.returnValue=false;
       return;
   }
}

> I have an aspx application that provides online testing.  The customer wants
> to disallow the student from hitting certain keystrokes like ALT-TAB, or
[quoted text clipped - 4 lines]
> sort of locked down.  Is there a way using script on the web page to capture
> certain keystrokes and not allow them to be sent to the OS?

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.