Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Oct 2005
    Thanked 0 Times in 0 Posts

    Capture Ctrl + G in firefox and highlight a field in the page

    Is it possible to capture ctrl + g in firefox and netscape so that when a user presses ctrl + g a field in the page should be highlighted?In firefox ctrl + g is find again . Can I make the firefox not to fire that event and capture it so that I can write my own event?

    Thanks in advance...

  2. #2
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Sydney, Australia
    Thanked 932 Times in 919 Posts
    Any key combinations with special meanings to either the operating system or the browser are NOT passed to the web page and therefore cannot be handled using Javascript. To be able to process Ctrl-G in Javascript you would have to disable that option in your browser first. For it to work for your visitors they would have to disable it in their browser.
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts