Solved

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

Posted on 2009-05-07
4
254 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
  • 2
  • 2
4 Comments
 
LVL 75

Expert Comment

by:Michel Plungjan
Comment Utility
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
Comment Utility
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
Comment Utility
Not that I know of
0
 

Author Closing Comment

by:loopstudio
Comment Utility
close
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

This article discusses the difference between strict equality operator and equality operator in JavaScript. The Need: Because JavaScript performs an implicit type conversion when performing comparisons, we have to take this into account when wri…
Before we dive into the marketing strategies involved with creating an effective homepage, it’s crucial that EE members know what a homepage is. In essence, a homepage is the introductory, or default page, of a website that typically highlights the …
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
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…

763 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now