473,796 Members | 2,465 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Disabling the shortcuts such as Ctrl+A, Ctrl+B.... using Javascript

Hello,

Can anybody please tell me how to disable the shortcuts of the
internet explorer? I have hosted control on the web page and i want to
give the inputs such as Ctrl+A, Ctrl+B and so on.. but whenever I type
them pop up windows open in internet explorer. How to disable them??
Thanks.

Regards,
Gouri.
Jul 10 '08 #1
2 2950


<Go************ @gmail.comwrote in message
news:d4******** *************** ***********@y38 g2000hsy.google groups.com...
Hello,

Can anybody please tell me how to disable the shortcuts of the
internet explorer? I have hosted control on the web page and i want to
give the inputs such as Ctrl+A, Ctrl+B and so on.. but whenever I type
them pop up windows open in internet explorer. How to disable them??
Thanks.

Regards,
Gouri.
Not sure this is ASP.NET but you look at handling the keydown and keypress
events. However not all key combinations can be cancelled and it's generally
poor UI practice to try to override standard combinations such as Ctrl+A
which the user might expect to select all text in a textarea, for example.

http://www.w3schools.com/jsref/jsref_onkeypress.asp
--

Joe Fawcett (MVP - XML)
http://joe.fawcett.name

Jul 10 '08 #2
HI

I have tried this code but didn't work...
<script type="text/javascript">
document.onkeyd own = function somefunction(e)
{
e = window.event;
//17 is keycode for "A"
if(e.ctrlKey == true && e.keyCode == parseInt("17") )
{
e.cancelBubble = true;
return false;
}
}
</script>

it detect the keys but the browsers still select the texts

Best of luck

------
Munna

www.munna.shatkotha.com/blog
www.munna.shatkotha.com
www.shatkotha.com
Jul 10 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
1971
by: Danny | last post by:
Hi, I am writing a C program trying to read highlighted text in aother application (Acrobat Reader or Microsoft Office). How do I find out which application is on focus and grab the text highlighted? Thanks. Danny
1
7499
by: anonieko | last post by:
> Use x = window.Open(...) x.document.write( yourhtml) > How to print from javascript using .print > How to use ContentWindow > > How t use getElementById > How to get HTML of document using document.body.innerHTML // mail.js var viewMode = 1; // WYSIWYG
3
2860
by: Matthew Wells | last post by:
I'm reposting because an idiot replied without reading the whole message. I've tried autokeys and it isn't working for this combination. Please read on. While in form view, how do you prevent someone from using Ctrl+, (ctl + comma) or Ctl + . (Ctl +period) to get to design view. I have all the normal properites turned off (Access special keys, F11, etc) but nothing seems to stop that one. I tried using AutoKeys to remap it, but I...
2
3196
by: john | last post by:
I posted this question to comp.lang.javascript but didn't get a response, so I'll try here. I am using ASP.NET and I have a datagrid. One of the columns in my grid is all checkboxes. When the user clicks on a certain button on the page, which is not in the grid, I want to be able to traverse through all the checkboxes in that column and see how many are checked. This is so that I can give them a confirmation dialog before I do an action...
6
2636
by: Morten Dahl | last post by:
The shortcuts won't work in my application. CTRL+Z CTRL+C CTRL+Y CTRL+X etc... In stead I must use the SHIFT key: CTRL+SHIFT+Z
2
11422
by: ahmad | last post by:
when i used the statment for(var i = 0; i < menu.length; i++) { menu.options.selected = "false"; } to deselect all the options within a list, it surprisingly selected all the options. I tried another option like menu.options.removeAttribute("selected");
2
2384
by: sukeshchand | last post by:
How to prevent changes in textbox when we use Ctrl+V or Paste using mouse without effecting the previously stored values in the text box. I want to Prevent the changes in the textbox by using certen conditions, first i use keyascii event to Control it, it is working where the user enter values to by using keyboard. but it is not working when the user copy some values from anoter position and pase it by using mouse.
1
4716
by: lolly | last post by:
hi i recently used a virtual keyboard from www.codeproject.com/jscript/jvk.asp. However this part of the code function keyb_callback(ch) { var text = document.getElementById("textfield"), val = text.value; switch(ch) { case "BackSpace":
0
1710
by: kavi2012 | last post by:
Hi I used the following function to disable the cut, Copy & paste in the Textbox. It works fine for me when I use ctrl+C,ctrl+X & ctrl+V. function disable(e) { if(event.ctrlKey) { event.returnValue = false; } }
0
9680
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
9528
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10456
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
10230
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
10174
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,...
0
10012
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6788
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();...
2
3731
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2926
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.