In my Perl based server application, I want to execute a script in a new pop up window. I was using a syntax like:
var my_window = window.open('open_window.pl, 'my window', 'width=800,height=600,resizable,scrollbars');
When I run the program in FF and Chrome it all works fine. I can open my pop-up window with above parameters and can see my desired result but the issue starts when I do the same test with IE 8. In spite of pop-up blocker off, the pop-up window was not launching, it was giving me a error message like:
Message: Invalid argument.
Line: 100 Char: 5
After debugging I found a solution which is some way very ridiculous. Issue was because of the reason that Microsoft does support the name property in window.open() with spaces [http://msdn.microsoft.com/en-us/library/ms536651%28v=vs.85%29.aspx] this means that if I make my window.open like [See GREEN string]
var my_window = window.open('open_window.pl, 'my_window', 'width=800,height=600,resizable,scrollbars');
then it should works.
After doing this change it works with me for all the browsers.
I don’t know why IE always through such type of errors, even if you launch the in-built Developer tool from IE interface then also you will get the same error message ”Invalid arguments” no further clue/pointer to solve the issue. MS really has to improve the error handling messages to user.
So guys, be careful while developing pop-up window for all browsers specially for IE.