Menu

IE7 PopUpAppender Access Exception

Help
Anonymous
2013-01-30
2013-04-29
  • Anonymous

    Anonymous - 2013-01-30

    Hi,

    When loading two PopUpAppenders on a single page (inner frame on separate domain - don't ask!) in IE7 it was giving an Access Exception on the second popup (because the windowName was identical). It worked fine on Chrome.

    To fix I changed the following line to make windowName unique:

    var windowName = "PopUp_" + location.host.replace(/[^a-z0-9]/gi, "_") + "_" + consoleAppenderId;
    

    to

    var windowName = "PopUp_" + location.host.replace(/[^a-z0-9]/gi, "_") + "_" + consoleAppenderId + "_" + applicationStartDate.getTime();
    

    Let me know if I'm doing something wrong. Cheers.

     
  • Tim Down

    Tim Down - 2013-02-07

    Since the consoleAppenderId should be unique for each PopUpAppender generated by a single instance of log4javascript, I assume you must have log4javascript running in two separate windows. Is that correct?

    If so, the timestamp seems a reasonable workaround. Theoretically you could end up with two windows generating PopUpAppenders within a millisecond of each other. I'm about to do a bugfix release, so I'll add something in to help with this.

     
  • Tim Down

    Tim Down - 2013-02-08

    Actually the timestamp is bad for one reason I've just remembered, which is that the idea is that the window name will remain the same if the page is refreshed, allowing a single pop-up window to be reused for multiple requests.

     
  • Tim Down

    Tim Down - 2013-02-08

    I've added a possible workaround for this in 1.4.4. Let me know if it doesn't work for you.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.