window.open error only in IE - Invalid argument

Chris Bornhoft picture Chris Bornhoft · Apr 26, 2011 · Viewed 10.9k times · Source

I have a simple calendar popup window come up when a date on the calendar is clicked. The code below works in Opera, FF and Chrome but not in IE6-8. It comes up with the Error on Page at the bottom and shows the error invalid argument.

<div class="day-number">1</div>
<td class="calendar-day" onclick="window.open('http://www.cal.com/admin/editevents.php?day=2&month=4&year=2011', 
'Edit Events', 'scrollbars=1,width=600,height=475');">

Could someone help me out and spot what I'm doing right but wrong according to IE?

Answer

Pekka picture Pekka · Apr 26, 2011

The window name shouldn't have a space. Try EditEvents.