Solved

Is it possible to catch the onKeyDown event on a page that includes a Java applet?

Posted on 2009-05-07
4
265 Views
Last Modified: 2013-11-23
I have a webpage containing a frame that has a java-applet inside of it.

On the webpage I check for onKeyDown. It works fine.

Except when the (i)frame contains a java-applet. Then it seems like the java-applet is steeling the event from the webpage, but unfortunately in a way, so that the user can still press [backspace] on the webpage and the browser goes 1 page back in the history.
The problem is that my OnKeyDown event doesnt catch the [backspace] (when the java-applet steels it). The whole idea was to prevent the user from being able to hit the [backspace]. And its working fine when there is no java-applet on the page.

What should I do in order to also catch the [backspace] when the page contains a frame with a java-applet?
0
Comment
Question by:loopstudio
[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
  • 2
4 Comments
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 24324779
Redesign the application so it can handle going back.

For example on the previous page have

<a href="page2.html" onClick="location.replace(this.href); return false">Next</a>
0
 

Author Comment

by:loopstudio
ID: 24325975
I guess You mean CANT'T ? :)

But I dont have a link or a user clicking on something, so I cant use Your suggested solution.
Its event driven, so its the application itself that changes the content of the frame - and sometimes its a java-applet.

But isnt there a way to catch it?
0
 
LVL 75

Accepted Solution

by:
Michel Plungjan earned 500 total points
ID: 24326061
Not that I know of
0
 

Author Closing Comment

by:loopstudio
ID: 31578962
close
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

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

Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
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)

695 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