Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

javascript - netscape

2 views
Skip to first unread message

Ayrton

unread,
Jul 30, 2005, 9:06:14 AM7/30/05
to
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)


--
Questa è una firma automatica di MesNews.
Sito: http://www.mesnews.net


Andrew Thompson

unread,
Jul 30, 2005, 9:41:04 AM7/30/05
to
On Sat, 30 Jul 2005 13:06:14 GMT, Ayrton wrote:

> 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

--
Andrew Thompson
physci.org 1point1c.org javasaver.com lensescapes.com athompson.info
Transmitido en Martian en SAP

Real Gagnon

unread,
Jul 31, 2005, 9:49:56 PM7/31/05
to
> 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.
--
Real Gagnon from Quebec, Canada
* Looking for Java or PB code examples ? Visit Real's How-to
* http://www.rgagnon.com/howto.html

Ayrton

unread,
Aug 1, 2005, 5:07:22 AM8/1/05
to
Il 01/08/2005, Real Gagnon ha detto :

>> 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.

NO, in my example it don't was.

Andrew Thompson

unread,
Aug 1, 2005, 5:35:18 AM8/1/05
to
On Mon, 01 Aug 2005 09:07:22 GMT, Ayrton wrote:

> Il 01/08/2005, Real Gagnon ha detto :
>>> I've make a simple applet and I must call javascript function.

..
>>> netscape.javascript.JSException
...


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

...


> 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?

80% Entertainment By Volume

Real Gagnon

unread,
Aug 1, 2005, 7:32:37 AM8/1/05
to
>>
>> Make sure that you have the MAYSCRIPT parameter in the APPLET tag.
>>
>> Bye.
>
> NO, in my example it don't was.
>

If your Applet is going to use the JSObject, you need to add MAYSCRIPT to

0 new messages