Solved

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

Posted on 2009-05-07
4
260 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
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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

This article will give core knowledge of JavaScript and will head in to your first JavaScript program. I am Durvesh Naik and I am here to deal with this series of JavaScript. I will teach you JavaScript in part wise , as its quite boring to read big…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
The purpose of this video is to demonstrate how to set up the WordPress backend so that each page automatically generates a Mailchimp signup form in the sidebar. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome…

809 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