Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 9 of 9
  1. #1
    New to the CF scene
    Join Date
    Oct 2011
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    window.open is not working for only 1 of my hundreds of users

    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".


    Please let me know if you have any ideas why this might not be working for this user.

  • #2
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,437
    Thanks
    75
    Thanked 4,372 Times in 4,337 Posts
    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.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.

  • #3
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,639
    Thanks
    0
    Thanked 649 Times in 639 Posts
    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.
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.

  • #4
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,437
    Thanks
    75
    Thanked 4,372 Times in 4,337 Posts
    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.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.

  • #5
    New to the CF scene
    Join Date
    Oct 2011
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.

  • #6
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,437
    Thanks
    75
    Thanked 4,372 Times in 4,337 Posts
    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.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.

  • #7
    New to the CF scene
    Join Date
    Oct 2011
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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..

  • #8
    Master Coder felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, Australia
    Posts
    6,639
    Thanks
    0
    Thanked 649 Times in 639 Posts
    Quote Originally Posted by btull89 View Post
    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.
    Stephen
    Learn Modern JavaScript - http://javascriptexample.net/
    Helping others to solve their computer problem at http://www.felgall.com/

    Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.

  • #9
    New to the CF scene
    Join Date
    Oct 2011
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •