Win a copy of Testing JavaScript Applications this week in the HTML Pages with CSS and JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
  • Piet Souris
  • Frits Walraven
  • Carey Brown


Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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,
Ranch Hand
Posts: 1070
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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");
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic