Thursday, September 29, 2011

JavaScript 'open' function show 'Error: Invalid argument' in Internet Explorer

JavaScript 'open' function can be used to open a webpage from inside another page.
The syntax is :open(url,'name','height','width');

If this function does not work and you get a 'Error: Invalid argument' when using Internet Explorer, check for space in the 'name' argument (eg: 'Prasanth Kumar'). If there is space between the 'name' argument, IE will show this error, but in FireFox it just works fine.