I'm supporting an application that uses the JavaScript method window.open to open a link in a new browser window. I need a sanity check.It's Internet Explorer 9 on 32-bit Windows 7. All add-ons are disabled, the pop-up blocker is turned off, and the site is in the Trusted Sites zone.The sanity check: The call to window.open seems to only work a handful of times if the window being opened is named optionWin. You boot up the machine, you open Internet Explorer, you log in the application, you click the link, and it works maybe 1-5 times. After that, the pop-up window will not get created when the link is clicked until after you reboot the computer.I've used the IE developer tools to debug the JavaScript, and the debugger hits the call to window.open every single time. It's just that nothing happens. The window is not created, and no error is logged to the console.What the hell?[Edited on April 3, 2013 at 3:36 PM. Reason : r not d]
4/3/2013 3:18:34 PM
Maybe something dumb like Popup Blocker or Javascript security settings?
4/3/2013 3:26:08 PM
Dude.
4/3/2013 3:36:12 PM
wasn't trying to be a jerk, Occam's Razor man [Edited on April 3, 2013 at 3:39 PM. Reason : didn't read closely enough]
4/3/2013 3:39:26 PM
Try dropping the Custom Level to the lowest security setting possible and see if that makes any difference.It doesn't make sense that it would be rights if it works intermittently.Also try logging into machine as Administrator.[Edited on April 3, 2013 at 4:01 PM. Reason : -]
4/3/2013 4:00:17 PM
In IE, you can't have spaces in your second variable (the new window's name).Try:window.open (address,'Ver_articulo', config=center);
4/3/2013 4:28:11 PM
You see the part where the parameter being passed is optionWin?Stimwalt: The Trusted Sites zone security is set to the Low level, and no other pop-ups are affected--just ones where the target window name is optionWin.[Edited on April 3, 2013 at 4:49 PM. Reason : ...]
4/3/2013 4:48:12 PM
http://social.msdn.microsoft.com/Forums/en-US/iewebdevelopment/thread/cc2bf09b-c811-430b-b0a0-b4e14ac46a7b
4/3/2013 4:50:14 PM
Force Compatibility Mode or Quirks Mode.
4/3/2013 9:44:18 PM
4/9/2013 3:51:56 PM
4/9/2013 4:19:18 PM
Post your code, amigo.
4/9/2013 6:25:55 PM
It's not mine, just what I'm supporting here. Here is the line in question:optionWin = window.open('scriptname.ext?arg1=foo&arg22=' + bar, 'optionWin', 'toolbar=no,resizable=yes,location=no,scrollbars=no,height=300,width=400,left=0,top=0,alwaysraised=yes');I've anonymized the URL being opened, which is the first parameter of window.open, but you can see the name passed for the window is just the string literal optionWin. There aren't a lot of moving parts here. It has nothing to do with the window options being passed in the third parameter, nothing to do with the URL in the first parameter, nothing to do with the fact that the return value is being assigned to a variable that coincidentally has the same name. I could strip it down to this and run it in the console:window.open('http://www.google.com', 'optionWin', '');Same result. No window opens.[Edited on April 10, 2013 at 8:30 AM. Reason : ...]
4/10/2013 8:28:47 AM
are you using window.close() to close the window, or are you closing it manually?
4/10/2013 8:38:35 AM
Manually, by clicking the X (as you do). I suspect there might be some funny business with the window manager not freeing the window handle or some such shit, so maybe the browser is actually trying to open the URL in this zombie window that isn't displaying, but I don't know why that'd be happening, how to identify whether it's happening, or how to fix it if it is happening.
4/10/2013 10:59:54 AM
Sorry if I missed it somewhere, but is this on multiple systems, or are you only testing on one pc?
4/10/2013 11:26:42 AM
It's restricted to three machines in the client's environment. I've suggested just reimaging the damn things.
4/10/2013 12:29:30 PM
if you're sure its only those 3 machines, then its definitely a problem with some software they've installed on there. probably an AV that's got hooks into IE and is fucking up popups.
4/10/2013 1:08:29 PM
I've had javascript go "dead" on several machines. I use dead in quotes because javascript seems to work fine and is installed properly, except sometimes it just dies on me and wont work anymore until I reboot. Chrome on the same machines continues to work with js. The problem always seems to stay localized to IE when it happens to me.
4/10/2013 4:13:20 PM
Basically, IE sucks bawlz]
4/10/2013 4:15:22 PM
Did you check your TCP/IP settings?
4/10/2013 4:48:18 PM
Update: The client elected to make his users access the application through Internet Explorer via Terminal Server. I don't understand that, but whatever, case closed.New case, same issue, different client. WTF?
4/22/2013 11:15:13 AM
couldn't replicate it on any machine in ie9/10. box pops erry time. its almost certainly some av software that's also got a broken popup blocker built in.
4/22/2013 11:25:52 AM