Closed Bug 304310 Opened 19 years ago Closed 17 years ago

JSObject.getWindow(MyApplet.getInstance()) fails and gives an Exception netscape.javascript.JSException

Categories

(Firefox :: General, defect)

1.0 Branch
x86
Windows 2000
defect
Not set
normal

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: nvspavan, Unassigned)

Details

(Whiteboard: CLOSEME 06/27)

User-Agent:       Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)
Build Identifier: Firefox 1.0.4, Firefox 1.0.6

I am trying to call a javascript function which would refresh the page from 
where i am opening the Applet.

JSObject jsObj = JSObject.getWindow(MyApplet.getInstance());
Object obj[] = {.....};
jsObj.call("myCall",obj)

The code gives an exception "netscape.javascript.JSException" for the line 
JSObject.getWindow..... 

This problem is for Firefox 1.0.4 and is reproducable on Firefox 1.0.6.

I checked on the net and there is a bug at 
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6282227

Could you please let me know the fix for this. If any patch or plugin is 
already there kindly point me to it.

Thanks
Pavan

Reproducible: Always
Related to Core bug 250154?
I reproduced this in a simple applet and then got it working by adding the following line to the calling object tag: -
  <param name="mayscript" value="true">

It was a bit of a stab in the dark on my part so i can't guarantee it's the fix to this fault.
Reporter, do you still see this problem with the latest Firefox 2? If not, can you please close this bug as WORKSFORME. Thanks!
Whiteboard: CLOSEME 06/27
Version: unspecified → 1.0 Branch
No response from reporter re: comment 3 -->INCOMPLETE.
Reporter, if you still see this problem with the latest release of Firefox 2, please reopen this bug. Thanks!
Status: UNCONFIRMED → RESOLVED
Closed: 17 years ago
Resolution: --- → INCOMPLETE
I ran my example in firefox 2 after taking out the mayscript parameter and got the following error: -

Error: JSObject.getWindow() requires mayscript attribute on this Applet

I suppose it's an improvement in that it makes the fault easier to fix in the code.
You need to log in before you can comment on or make changes to this bug.