Search code examples
javascriptinternet-explorerbookmarkletwindow.open

window.open is not working in IE 7 and 8


I have a little bookmarklet that opens up a new window, only problem is, it's not working. I have tried the "no spaces in title trick" as well as a few others, (took out the void() part, put quotes around all the width, height, and so on) but it still won't fly. Here is the code below:

javascript:void(window.open('https://myfavs.me/create.php?f_url='+encodeURIComponent(location.href)+'&f_title='+encodeURIComponent(document.title),'Add_Page_to_MyFavs.me','width=400,height=300,menubar=no,status=yes,location=no,toolbar=no,scrollbars=yes'))

The error that I am getting is:

User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0)
Timestamp: Tue, 1 Feb 2011 04:59:43 UTC
Message: Invalid argument.
Line: 1
Char: 1
Code: 0
URI: https://myfavs.me/

Can anyone shed any light on this?


Solution

  • Internet Explorer is notoriously picky when it comes to names of windows. I suspect that changing Add_Page_to_MyFavs.me to AddPageToMyFavs will clear up the problem.