Site Navigation

Monday, June 9, 2008

bug 289 - popup window name can't have spaces in IE

Issue: #289
Affects: IE6, IE7, IE8

Note: Readers are indicating that you can't use dashes in IE either! e.g. 'this-name-fails'

When you open a popup window in your web applications using the JavaScript window.open() function if you must specify the name of the window, it mustn't contain spaces in IE, or the function will fail to open the window.

Example:

<script type="text/javascript">
var url = 'http://www.google.com/q?Hello=World';
var featureList = 'width=500,height=400';
var childWin = window.open(url, 'name of child win', featureList);
</script>



Known Workarounds: One. Quite simple. Be sure that all your popup window names do not contain spaces.

Note: Readers are indicating that you can't use dashes in IE either! e.g. 'this-name-fails'

Example Workaround Code:

<script type="text/javascript">
var url = 'http://www.google.com/q?Hello=World';
var featureList = 'width=500,height=400';
var childWin = window.open(url, 'name_of_child_win', featureList);
</script>



Related Issues: None.

Bug/Site Feedback |
Submit a bug