By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
449,156 Members | 1,037 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 449,156 IT Pros & Developers. It's quick & easy.

Actively call a JavaScript from a Applet.

P: n/a

Hi everyone;
* How can I actively call a Javascript function from inside a Applet?

* What would be a good messaging system among some Applets inside the
same page?

Thank you very much.
Roberto.

Jul 20 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Roberto Gallo wrote:
Hi everyone;
* How can I actively call a Javascript function from inside a Applet?
Ask in comp.lang.java
java != javascript
* What would be a good messaging system among some Applets inside the
same page?


Ask in comp.lang.java
java != javascript
--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/

Jul 20 '05 #2

P: n/a
Randy Webb <hi************@aol.com> writes:
Ask in comp.lang.java
java != javascript


I think the original poster knows that well enough, when he wants to
call a Javascript function from inside the applet.

That said, I think the solution will be in Java, so asking in a Java
group could be better.

Netscape's solution for Javascript/Java interaction is called
LiveConnect (the original name for JavaScript was LiveScript, and I
don't think it is a coincidence).

<URL:http://developer.netscape.com/docs/t...#Communicating with JavaScript from>

So, to call the Javascript alert function, do:

JSObject window = netscape.javascript.JSObject.getWindow();
window.call("alert",new Object[]{"Test"});

I don't know if it will work in IE, or with the MS-"JVM".
* What would be a good messaging system among some Applets inside the
same page?


I don't know if there is anything better, but you can use LiveConnect,
if permissions on the browser allows it.

/L
--
Lasse Reichstein Nielsen - lr*@hotpop.com
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'
Jul 20 '05 #3

P: n/a
Hi,

Roberto Gallo wrote:
Hi everyone;
* How can I actively call a Javascript function from inside a Applet?
See
http://www.galasoft-lb.ch/myjavascri...LiveConnect102
* What would be a good messaging system among some Applets inside the
same page?
See
http://www.galasoft-lb.ch/myjava/CommTest/backup00/

Thank you very much.
Roberto.


Laurent
--
Laurent Bugnion, GalaSoft
Software engineering: http://www.galasoft-LB.ch
Private/Malaysia: http://mypage.bluewin.ch/lbugnion
Support children in Calcutta: http://www.calcutta-espoir.ch

Jul 20 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.