|
|
Subject:
Window.event in Java Applet
Category: Computers > Programming Asked by: milosh-ga List Price: $20.00 |
Posted:
16 May 2005 22:50 PDT
Expires: 15 Jun 2005 22:50 PDT Question ID: 522480 |
How to wrap JavaScript window.event object into Java class within an applet using JSObject? |
|
There is no answer at this time. |
|
Subject:
Re: Window.event in Java Applet
From: barchibald-ga on 01 Jun 2005 17:39 PDT |
First option is: js = JSObject.getWindow(this); you now have access to the entire window object including the "event" member which you can access via getMember(). I might try some alternative, depending on what you are trying to do: Could create a broker of sorts within your Javascript. Assuming you know how to handle events generally within your browser then you can say things like: <script language="Javascript"> function HandleMyEvents(someparameters) { document.MyJavaApplet.MyJavaAppletMethod (someparameters); } I can provide further examples, but I'm guessing you are savvy with Java and Javascript. Alternatively, you could build some watchers into your applet that regularly called a a javascript function where you have stored recent events. I would recommend the first option, not this one. |
Subject:
Re: Window.event in Java Applet
From: milosh-ga on 01 Jun 2005 18:04 PDT |
I tried to access event member via getMember method, but it throws JSException. I read on Java Sun site that JSObject implementation is not supporting event model from HTML DOM. It supports only limited amount of tags. I was looking more for an alternative approach for accessing full HTML DOM. One idea is to embed IE Activex into Applet, but I found some problems with that in couple of forums. Second idea is to use Common DOM API from Java Sun. Problem with second solution is that full implementation is available only from 1.5.0 (and full is still questionable), which is unacceptable for lot of customers with 1.4.x. I understand that the problem is not trivial and definitely not worth $20. I am prepared to put in very generous tip in case that solution is found. I fairly new to google answers and $20 is just a cautious approach. Thanks for your time, Milosh |
If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you. |
Search Google Answers for |
Google Home - Answers FAQ - Terms of Service - Privacy Policy |