...

View Full Version : window.open is not working for only 1 of my hundreds of users



btull89
11-21-2012, 08:47 PM
I have 1 user on the website I maintain that window.open is not working for. We have hundreds of other users that this is working for except this one person. The user tried using IE9 and IE8.

I did a view source on the page while remoted into their machine and I noticed some weird characters in the javascript. These characters only appeared in this myopenwindow function and did not appear in any other javascript functions on the page.

Scripting is allowed in the browser and the popup blocker is off. Below is the code that is not working for the user:

The winName variable equals "Profile".

http://i.stack.imgur.com/Ih7Ht.png
Please let me know if you have any ideas why this might not be working for this user.

Old Pedant
11-21-2012, 11:23 PM
Did you use the IE9 debugger?

It would have told you if there was a JS error or not.

I would *suspect* there is, because of those bogus characters, but of course can't be sure.

Anyway, since you are able to remote into that machine, just bring up IE9 and then click on the F12 key to bring up the debugger.

Click on the CONSOLE tab.

Then click on whatever it is that is supposed to open the popup and check to see what, if any, error was logged into the console.

felgall
11-22-2012, 01:07 AM
I would expect that it has something to do with the default characterset defined in the browser - it is generally a characterset mismatch that causes characters to display like that.

Old Pedant
11-22-2012, 01:36 AM
Makes sense, Felgall, but why would a SPACE display like that? Hmmm...or maybe those are TABs? But even so...

It is suspicious that the blocks don't appear before var theWin; but do before the other lines.

btull89
11-22-2012, 05:03 AM
Thank you for your replies!

I did use the debugger, but I tried to set a breakpoint in the function. The debugger would not allow a breakpoint in the function due to those blocks. I can try to set a breakpoint where the function is being called, but my user may not be in until Monday.

Felgall, I was thinking the same thing, but I don't how I can check for a character set mismatch. Those blocks look like they could be spaces.
I looked and I don't think that the webpage is setting utf-8 encoding in any of our pages if that helps.

Old Pedant
11-22-2012, 07:06 AM
maybe simply make dead sure that, in the original HTML/JS source code, that you use *only* spaces in there. Actually delete the characters that are there now and type in spaces. Or just delete the characters that are there, since the spacing is only for humans; JS doesn't care.

And yeah, of course you wouldn't be able to set a breakpoint there. If you are getting a syntax error in the function, then the function doesn't exist. But the error console would tell you about the syntax error without the need to use any breakpoint.

btull89
11-23-2012, 05:14 PM
Those characters were spaces.. There was a tab before "var theWin;" and it did not display those blocks.. Are the spaces the problem?

Also, why is only 1 person out of our hundreds of users having this issue? It doesn't make much sense..

felgall
11-23-2012, 08:27 PM
Also, why is only 1 person out of our hundreds of users having this issue? It doesn't make much sense..

It depends on what default characterset you configure your browser to use. In this case one of your visitors had the charset set in a way that caused the problem whereas the other visitors had it set to a different value that didn't cause the problem. Likely the majority are using the default and the one changed it or the one is in a different country to the others.

btull89
11-23-2012, 08:32 PM
That makes sense, but one of the IT Techs downgraded him with a fresh install of IE8 and the issue still persisted. I'm not sure where it would be getting the character set from..

I removed the space characters and I'm going to have the user try to open a window when they come back on Monday.

Thank you both for helping me with this issue! It is very kind of you.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum