Forums Register Login

Listening for Function Keys

+Pie Number of slices to send: Send
Hi all,

I'm not sure if this is the correct forum for this question. If it isn't, please point me to the correct place.

I have an application that runs in websphere. There is a main webpage with frames. It uses functions in a java class file.

I need to set this app up so that it will listen for function keys. Specifically I need to capture F1 and point it to the app help instead of IE's help. I also want to be able to capture other Fkeys and have them perform other functions that are available in the main page by clicking on controls.

The issue that I'm having trouble with is how to register the listener. I don't have a control to register it to. I want the app to do the listening and act appropriately.

I would appreciate any help that can be offered.

Thanks,

Doug Harding
State of Utah / Division of Finance
+Pie Number of slices to send: Send
Doug Harding hailing from State of Utah what you need here is
some Javascript to capture keys;also if required, you might make functions in your Java class and call those functions on Key event in Javascript


Example:


Here is the applet class

TestJREApplet extends Applet{

public static String jreExits(){

return "Found JRE";

}
}

Here in your web page you will have two things 1) Applet tag 2)Javascript


<Applet code="TestJREApplet" name="myApplet" height=1 width=1></Applet>


<Script>

function checkJRE(){

if(myApplet){

alert(myApplet.jreExits());
}

else {

// Applet not loaded, most probably no JRE installed on turned on

// do some work

}

}

</Script>


you might google for more on calling Applet from Javascript, and for key code, keyevents etc in JavaScript.

There is a difference in Netscape and IE regarding Javascript but many javascript code snippets work in both.

Thanks,

Maki Jav
[ December 06, 2006: Message edited by: Maki Jav ]
Let me tell you a story about a man named Jed. He made this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 825 times.
Similar Threads
overriding javascript funtions in another frame
Static passwords
urgent! need onkeypress event handler workaround
singletons & servlets...
Javascript functions
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 12:59:13.