FireBug: How do you tell which browser window an exeption occurred in

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Frinavale
    Recognized Expert Expert
    • Oct 2006
    • 9749

    FireBug: How do you tell which browser window an exeption occurred in

    I'm having a problem that I cannot seem to debug.

    FireFox's FireBug extension is indicating that there is an error being thrown, but I have no idea which window caused the error to be thrown.

    I have 3 browser windows open:
    • (parent) the main window that is displaying a page where the user can provide details in order to create a new thing,
    • (first child) a child window of the main window that is displaying page that describes details about a particular property of the thing & allows the user to edit this
    • (second child) a child window of the first child window that is displaying details about a particular thing in in the first child window.


    So, when the user closes the second child window, the first child window needs to update in order to display current information.

    In order to do this I'm calling a function in the first child window during the onbeforeunload event in the second child window:

    (First Child Window)
    Code:
    function UpdateDetails() {
       //do stuff that
    }
    (Second Child Window)
    Code:
     window.onbeforeunload = CloseEvent;
              
    function CloseEvent() {
       if (window.opener && !window.opener.closed) {
          window.opener.UpdateDetails();
        }
    }
    function CloseBrowserWindow() {
       window.close();
    }
    Simple right?
    Well an exception's being thrown Somewhere along the line.
    The exception is as follows:

    Sys is not defined
    Sys$CultureInfo $_getAbbrMonthI ndex("")ScriptR e...=2bdecd23 (line 6391)
    ScriptResource. axd?d=J5i-KabhFu-XHqJ2IolaVHA6NL OVUeCKfCK59WFRj eQwUmCK8H7qKbDJ pNBkRgMbkm7VMmv Hbbz8H3ZZJBf4uQ 2&t=ffffffffaf0 3ec7a()()

    This exception is being thrown by a function in the the ASP.NET Ajax framework/class library....

    One annoying thing about this exception is that my code has nothing to do with the "getAbbrMontInd ex" method and I have no idea why it's being called.

    The other thing that is really confusing to me is which window is the exception being thrown in?

    Is it being thrown in the second child window when it's closed?
    Is it thrown in the first child window?

    How can I tell?
  • Frinavale
    Recognized Expert Expert
    • Oct 2006
    • 9749

    #2
    I don't know the answer to my question regarding FireBug (how to determine which browser window an exception occurred in).

    But I solved my problem regarding the exception.

    I figured that since the exception was being thrown because Ajax Framework was unavailable it had to do with the second child window being closed.

    As it turned out the "exit" button on the page being displayed in the second child window (it closed the browser window) was submitting to the server. When the response came back, the window was closed (or more likely in the process of closing) and so the exception was thrown.

    After adding code that prevented the button from submitting to the server the exception no longer occurred.

    I still don't know how to tell which browser window an exception is thrown in using FireBug and would love to learn the answer to this if anyone has it.

    Thanks

    -Frinny

    Comment

    Working...