#me { float: left; }

March 7, 2007

window.open in IE (invalid argument)

Filed under: Javascript — Simon Rigby @ 1:24 am

A quick IE issue. Calling window.open with spaces in the window name will error is IE but works fine in Firefox

Example

window.open(‘myPage.html’, ‘My New Page’);

will error

window.open(‘myPage.html’, ‘MyNewPage’);

will not :)

UPDATE: Thanks to all those who posted additions here. By the looks IE complains about a lot more than simply a space in the name – special characters are not good apparantly and to be avoided to avoid possible problems.

Theme: WordPress Classic. Blog at WordPress.com.

Follow

Get every new post delivered to your Inbox.