javascript - netscape

A

Ayrton

I've make a simple applet and I must call javascript function.
With nescape and firefox I've to much problem that I don't understand.
Must I do some browser's settings ?


import netscape.javascript.*;
import java.applet.*;


public class ProvaReflect extends Applet {

private JSObject window = null;

public void init(){}
public void start(){
JSObject win = (JSObject)JSObject.getWindow(this);
}
}



Error:

Java Plug-in 1.5.0_04

......

netscape.javascript.JSException
at netscape.javascript.JSObject.getWindow(Unknown Source)
at ProvaReflect.start(ProvaReflect.java:15)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
 
A

Andrew Thompson

I've make a simple applet and I must call javascript function.
With nescape and firefox I've to much problem that I don't understand.

<I suggest>
Try doing the same thing in pure JavaScript first,
which is a much easier way to debug JS. Then call
the JavaScript function from within the Java applet.
</I suggest>

Note that approach 'fixed' a Sun bug report recently.
<http://groups.google.com/group/comp.lang.java.help/msg/b5239a5a8837e4c6>

HTH
 
R

Real Gagnon

I've make a simple applet and I must call javascript function.
With nescape and firefox I've to much problem that I don't understand.
Must I do some browser's settings ?
.....

netscape.javascript.JSException
at netscape.javascript.JSObject.getWindow(Unknown Source)
at ProvaReflect.start(ProvaReflect.java:15)
at sun.applet.AppletPanel.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

Make sure that you have the MAYSCRIPT parameter in the APPLET tag.

Bye.
 
A

Andrew Thompson

Il 01/08/2005, Real Gagnon ha detto : ....
NO, in my example it don't was.

A link tells us volumes more than a series
of code snippets and words.

Where is your web page? What is the URL?
 

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

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top