[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Emulate keyboard key click with JavaScript

Posted on 2004-03-29
5
Medium Priority
?
776 Views
Last Modified: 2012-06-21
Does anyone know how to emulate a keyboard key click?  For example, by pressing a link, can I bring up the Internet Explorer Find dialog box in the same way that pressing Ctrl+f on my keyboard brings up the Find dialog box?
0
Comment
Question by:pdben
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
5 Comments
 
LVL 6

Accepted Solution

by:
dgelinas earned 500 total points
ID: 10708020
Can't do that.  You can capture the ctrl+f but you cannot bring up the dialog box, or any of the other features that you might be thinking of.  You can work to duplicate what that window does though.  

For example:
http://www.experts-exchange.com/Web/Web_Languages/JavaScript/Q_20931835.html
0
 
LVL 31

Expert Comment

by:GwynforWeb
ID: 10708205
key events can not be emulated for security reasons other wise you could take over the users machine. To sinmulate ctrl-f use the code I posted in the above link.
0
 

Author Comment

by:pdben
ID: 10708448
Another similar keyboard action I would like to emulate is the Undo (ctrl+u) and Redo (ctrl+y) functions in Internet Explorer objects which support variable text.  I would like to do this with execCommand(), but I don't think it supports it currently.  Is there any other way to do utilize Undo and Redo other than prompting a user to use their keyboard?
0
 

Author Comment

by:pdben
ID: 11077221
I will accept dgelinas
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction HTML checkboxes provide the perfect way for a web developer to receive client input when the client's options might be none, one or many.  But the PHP code for processing the checkboxes can be confusing at first.  What if a checkbox is…
A while back, I ran into a situation where I was trying to use the calculated columns feature in SharePoint 2013 to do some simple math using values in two lists. Between certain data types not being accessible, and also with trying to make a one to…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

649 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question