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)
Expand|Select|Wrap|Line Numbers
- function UpdateDetails() {
- //do stuff that
- }
Expand|Select|Wrap|Line Numbers
- window.onbeforeunload = CloseEvent;
- function CloseEvent() {
- if (window.opener && !window.opener.closed) {
- window.opener.UpdateDetails();
- }
- }
- function CloseBrowserWindow() {
- window.close();
- }
Well an exception's being thrown Somewhere along the line.
The exception is as follows:
This exception is being thrown by a function in the the ASP.NET Ajax framework/class library....
Sys is not defined
Sys$CultureInfo$_getAbbrMonthIndex("")ScriptRe...= 2bdecd23 (line 6391)
ScriptResource.axd?d=J5i-KabhFu-XHqJ2IolaVHA6NLOVUeCKfCK59WFRjeQwUmCK8H7qKbDJpNBkR gMbkm7VMmvHbbz8H3ZZJBf4uQ2&t=ffffffffaf03ec7a()()
One annoying thing about this exception is that my code has nothing to do with the "getAbbrMontIndex" 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?