File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes HTML, CSS and JavaScript and the fly likes JSException. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "JSException." Watch "JSException." New topic


arul narayan

Joined: Sep 26, 2000
Posts: 17
Hi all,
When I try to open a new window using, I get JSException. I am passing the url to be opened from a java program to the javascript as given below:
Here is the code in the java program :
public void openNewWindow()
{String strURL[] = new String[1];
JSObject win = JSObject.getWindow(this);"openWindow",strURL);
catch (Exception ex)
And here is the JavaScript code :
function openWindow(strURL)
Can anyone tell me why I get this error ?
Thanks in advance,

bill bozeman
Ranch Hand

Joined: Jun 30, 2000
Posts: 1070
Haven't used Java to call a javascript to open a window before, but one thought is that you have quotes around your strURL in your javascript code. Since this is a variable, I would think you would not want to have the quotes. So it would read: (strURL,"name","toolbars,menubar,scrollbars");
I agree. Here's the link:
subject: JSException.
It's not a secret anymore!