Google Answers Logo
View Question
 
Q: Window.event in Java Applet ( No Answer,   2 Comments )
Question  
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?
Answer  
There is no answer at this time.

Comments  
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

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

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 Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy