473,654 Members | 3,062 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

javascript:disa ble key strokes

1 New Member
i have been tryin to program(javascr ipt) to disable the following keystroke combinations
CTRL+O or CTRL+L Go to a new location (O = 79 L = 76)
CTRL+S Save the current page ( S = 83)
CTRL+E Open Search in Explorer bar (E = 69)
CTRL+I Open Favorites in Explorer bar (I = 73)
CTRL+H Open History in Explorer bar (H=72)
CTRL+ click In History or Favorites bars, open multiple


CTRL+LEFT ARROW When in the Address bar, move the cursor left to the next logical break (. or /) (LEFT =37)
CTRL+RIGHT ARROW When in the Address bar, move the cursor right to the next logical break (. or /)(RGT = 39)
CTRL+ENTER Add "www." to the beginning and ".com" to the end of the text typed in the Address bar (ENTER= 13)
CTRL+D Add the current page to your favorites (D = 68)



ALT+D Select the text in the Address bar (alt=18,D=68)
ALT+HOME Go to your Home page (ALT= 18,HOME= 36)

SHIFT+F10 Display a shortcut menu for a link (shift = 16 , f10 = 121)
folders


F4 Display the Address bar history (F4= 115)
F11 Toggle between Full Screen and regular view of


wherein i have managed to disable the ones NOT in bold
now the ones in BOLD seem to have the conrol to address bar....or out of the page
CAN NEBDY HELP????????
Apr 27 '06 #1
3 11975
poptop
1 New Member
i have been tryin to program(javascr ipt) to disable the following keystroke combinations
CTRL+O or CTRL+L Go to a new location (O = 79 L = 76)
CTRL+S Save the current page ( S = 83)
CTRL+E Open Search in Explorer bar (E = 69)
CTRL+I Open Favorites in Explorer bar (I = 73)
CTRL+H Open History in Explorer bar (H=72)
CTRL+ click In History or Favorites bars, open multiple


CTRL+LEFT ARROW When in the Address bar, move the cursor left to the next logical break (. or /) (LEFT =37)
CTRL+RIGHT ARROW When in the Address bar, move the cursor right to the next logical break (. or /)(RGT = 39)
CTRL+ENTER Add "www." to the beginning and ".com" to the end of the text typed in the Address bar (ENTER= 13)
CTRL+D Add the current page to your favorites (D = 68)



ALT+D Select the text in the Address bar (alt=18,D=68)
ALT+HOME Go to your Home page (ALT= 18,HOME= 36)

SHIFT+F10 Display a shortcut menu for a link (shift = 16 , f10 = 121)
folders


F4 Display the Address bar history (F4= 115)
F11 Toggle between Full Screen and regular view of


wherein i have managed to disable the ones NOT in bold
now the ones in BOLD seem to have the conrol to address bar....or out of the page
CAN NEBDY HELP????????
Hi there,
IMHO, Javascript operates on the client side and only on the objects contained in the DOM. The ADDRESS bar is not part of the DOM object model. It is part of the browser object model and as such will not be affected by javascript key events. I suppose you could write some sort of add-in to control the address bar text. Seems kind of intrusive though. Who'd want that?
Jul 31 '07 #2
LesterB40
1 New Member
Hi. Sorry, I don't have any answers to your questions at the moment. I was wondering if I could get your solution to disabling the CTRL+S Save the current page ( S = 83) option, plus any of the others you've figured out? I know, you're gettin' nothin' out of this. :o)

Thanks.
Jul 28 '08 #3
acoder
16,027 Recognized Expert Moderator MVP
Welcome to Bytes!

To disable key strokes, return false when detecting them on the key events, e.g. onkeypress/down.
Jul 29 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

9
2869
by: Dennis Allen | last post by:
Hi. What's the best way to display an image, disabling the user's ability to right-click on it? I believe you have to use <body oncontextmenu="return false">. Would the following work? var x = "<head><\/head><body oncontextmenu="return false"><img src='temp.jpg' border=0><\/body>" top.document.open()
4
5068
by: Quatney | last post by:
Okay, I'm going nuts here. I know this is VERY easy and I shouldn't have problems with this, but I can't seem to figure out what I want to do. I have a form, with two drop down boxes. I want to be able to disable the second drop down box when a specific value is chosen on the first. I can't seem to figure out how to do this. Go easy on me, I'm a newbie for the most part, but here is my code.
1
1998
by: Daren Hawes | last post by:
Hi, I have a ASP.NET 1.1 page that in top corner has a login box & button. Then a large form. Users can fill out the form and press enter, but it actually submits the login not the one I want. How can I ensure that the Enter submits the second submit button on the page and not the first? How can I stop enter submitting at all?
4
18646
by: Patrick Flaherty | last post by:
Hi, Experienced programmer but new to PHP. Moreover I'm to use PHP with Xoops on top (this adds object orientation?). I don't seem to find a xoops Usenet group? Whatever the case (and presumably a Xoops property): how does one disable (grey-out) a button?
5
1456
by: Morten Snedker | last post by:
I'm not that great at reading javascripts. Instead of doing nothing I'd like to return a Tab-character, if Enter occurs: <script language="javascript" type="text/javascript" > //disable enter-key function kH(e) { var pK = e ? e.which : window.event.keyCode; return pK != 13;
4
2784
by: pythoNewbie | last post by:
Hi guys I have 2 javascript functions, First I include which does swap images whenever I pass the mouse over a certain image <script language="JavaScript" type="text/JavaScript" src="includes/MapScript.js"></script> then I wanted to include another function inside a table <td> tag that moves text in a way similar to marquee.
0
8376
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8815
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8708
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8489
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6161
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5622
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4294
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2716
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1916
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.