Hi all,
When I try to open a new window using window.open, 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];
strURL[0]="http://www.abc.com";
try
{
JSObject win = JSObject.getWindow(this);
win.call("openWindow",strURL);
}
catch (Exception ex)
{System.out.println("ex::::"+ex);
}
}
And here is the JavaScript code :
function openWindow(strURL)
{
window.open("strURL","","toolbar,location,menubar,titlebar");
}
Can anyone tell me why I get this error ?
Thanks in advance,
arul.