Applet - Javascript communication

R

Roberto Gallo

Hi again. Thank you for previews answers.

I have another question.... How can I inform a Javascipt, that must
submit my Applet's data, that this same Applet has produced the data in
question?
Or in other words, is there any way to call a JavaScript junction within
the Applet? Is it the best way?
What do you suggest?

Thank you very much again,

Roberto Gallo.
 
S

Silvio Bierman

Roberto Gallo said:
Hi again. Thank you for previews answers.

I have another question.... How can I inform a Javascipt, that must
submit my Applet's data, that this same Applet has produced the data in
question?
Or in other words, is there any way to call a JavaScript junction within
the Applet? Is it the best way?
What do you suggest?

Thank you very much again,

Roberto Gallo.

Hello Robert,

You need a Netscape JAR file name java40.jar to compile the next code but
when running in a browser the referred classes are supplied by the
environment.

public Object callJS(String jsCode)
{
JSObject window = JSObject.getWindow(appletInstance);
window.eval(jsCode);
}

Regards,

Silvio Bierman
 
S

Silvio Bierman

Silvio Bierman said:
Hello Robert,

You need a Netscape JAR file name java40.jar to compile the next code but
when running in a browser the referred classes are supplied by the
environment.

public Object callJS(String jsCode)
{
JSObject window = JSObject.getWindow(appletInstance);
window.eval(jsCode);
}

Regards,

Silvio Bierman

typo: the last statement should be

return window.eval(jsCode);
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,431
Messages
2,571,678
Members
48,796
Latest member
Greg L.

Latest Threads

Top