IDMIntranet eXchange 
[ Home | Post | Register/Awards | Find | F A Q | Archive ]

 Home/Articles
  •  Recent Tutorials
  •  Recent Features
  •  Top Twenty Articles
  •  Oldies But Goodies
 ITAdvisor
  •  News & Analysis
  •  Security
  •  Intranet Buzz!
  •  Intranet Talk
  •  Intranet Corner
  •  CaseStudies/ Departments
 Intranet Development
  •  WirelessEnterprise
  •  Getting Started
  •  JavaScript
  •  VBScript
  •  HTML/DHTML
  •  XML
  •  ASP/IIS
  •  Perl
  •  PHP
  •  CascadingStyleSheets
  •  Dreamweaver
  •  FrontPage
 Information Management
  •  Content Management
  •  Collaboration
  •  Portals
  •  ASPs
 Intranet Resources
  •  Intranet FAQ
  •  Discussion Board
  •  Jobs Board
  •  Events Calendar
  •  Intranet Books
  •  Tools of the Trade
  •  Glossary
 Archive
 Site Map

Modern Daze: Comics Page

New

Free Newsletter!
 
Privacy Policy

Search IDM:


Hot Intranet eXchange discussion board Threads
º  masking in javascript
º  Can pseudo-url in image maps work? -
º  How do I make these into a real type?
º  Access and Intranet
º  Help with a plan for an Intranet
º  Frames problem
º  Opening Word and Excel Documents from Intranet
º  asp file not running in local intranet environment
º  Best Document Management / Collaboration software
º  readonly text entry
º  Small company intranets
º  Forcing IE to open Excel Workbooks in a New Instance
º  Criteria for content management systems/products
º  Best Document Management / Collaboration software
º  How to have How to have an image follow the mouse cursor
º  Creating Hyperlinks - Database driven
º  Table background..
º  MS Access returning multiple rows

More Intranet eXchange Highlights

*  Articles Elswhere on Internet.com

Re: Trapping 'Alt' arrow keys


[ Follow Ups ] [ Post Followup ] [ Intranet eXchange ] [ IDM Home ]


Posted by karthik on October 20, 2000 at 1:0:20:

In Reply to: Trapping 'Alt' arrow keys posted by Dean on October 17, 2000 at 12:40:50:

Hope the below helps.
function disablerightclick(e)
{
if (event.button == 2 || event.button == 3)
{
top.TPUtl.DisplayError( "E_Invalid_Key" );
return false;
}
}

function disablekeyboardnavigation(e)
{

if ( event.keyCode == 8 || event.keyCode == 27 || event.keyCode == 112 || event.keyCode == 114 || event.keyCode == 117 || event.keyCode == 93 || (event.altKey && (event.keyCode == 37 || event.keyCode == 39) ) || (event.ctrlKey && event.keyCode == 82 ) || event.keyCode == 116 || event.keyCode == 121 || event.ctrlKey )
{
if( prevKey == 18 && ( event.keyCode == 37 || event.keyCode == 39 ) )
{
event.keyCode = 0;
prevKey = 0;
top.TPUtl.DisplayError( "E_Invalid_Key" );
return false;
}
if (prevKey = 16 && event.keyCode == 121 )
{
prevKey = event.keyCode;
return false;
}
prevKey = event.keyCode;
if( event.keyCode == 116 || event.keyCode == 117 || event.keyCode == 93 )
{
event.keyCode = 0;
return false;
}
if( (event.keyCode!=8) || ( event.keyCode==8 && event.srcElement.type != "text" ) )
{
if( event.keyCode==8 && event.srcElement.type == "textarea" )
{
return true;
}
else
{
return false;
}
}
}
prevKey = event.keyCode;
return true;
}


document.onkeydown = disablekeyboardnavigation;
window.onkeydown = disablekeyboardnavigation;
document.onmousedown = disablerightclick;
window.onmousedown = disablerightclick;



Follow Ups:



Post a Followup

Name:     
E-Mail:   
Subject:  
Message:

Optional Link URL: 
Link Title:        

      



[ Follow Ups ] [ Post Followup ] [ Intranet eXchange ] [ IDM Home ]