473,398 Members | 2,368 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,398 software developers and data experts.

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

Frinavale
9,735 Expert Mod 8TB
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)
Expand|Select|Wrap|Line Numbers
  1. function UpdateDetails() {
  2.    //do stuff that
  3. }
(Second Child Window)
Expand|Select|Wrap|Line Numbers
  1.  window.onbeforeunload = CloseEvent;
  2.  
  3. function CloseEvent() {
  4.    if (window.opener && !window.opener.closed) {
  5.       window.opener.UpdateDetails();
  6.     }
  7. }
  8. function CloseBrowserWindow() {
  9.    window.close();
  10. }
Simple right?
Well an exception's being thrown Somewhere along the line.
The exception is as follows:

Sys is not defined
Sys$CultureInfo$_getAbbrMonthIndex("")ScriptRe...= 2bdecd23 (line 6391)
ScriptResource.axd?d=J5i-KabhFu-XHqJ2IolaVHA6NLOVUeCKfCK59WFRjeQwUmCK8H7qKbDJpNBkR gMbkm7VMmvHbbz8H3ZZJBf4uQ2&t=ffffffffaf03ec7a()()
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 "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?
Mar 12 '09 #1
1 1718
Frinavale
9,735 Expert Mod 8TB
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
Mar 12 '09 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Clinton Goff | last post by:
I am attempting to write a javascript app that will open a second browser window, load a url, such as www.google.com (foreign url) and perform a <File-Save As> function on that window. I am able...
3
by: Shiperton Henethe | last post by:
Hi Can anyone tell me how to open up a new normal, full-sized browser window from a small popup window? I'm using something like this. <script language="javascript"> <!--
18
by: puzzled | last post by:
I have looked and looked and not found the answer to this one - just lots of references to this or that "hack" that is supposed to fix the problem (and it is a problem to some people). If I have...
10
by: santiago538 | last post by:
Hi, Is there any way to specify which monitor a Window.open() will launch a new browser window in on systems with more than one display. It would only need to work with Mozilla browsers, and not...
1
by: chazmanian | last post by:
We have a situation where we display PDF files through IE via a method in our code-behind as follows protected void displayPDF(string exePath, string filePath { // exePath is the...
5
by: Nathan Sokalski | last post by:
How do I open and change properties of (such as size, position, scroll position, visibility of toolbars, etc.) a browser window? Thanks. -- Nathan Sokalski njsokalski@hotmail.com...
1
by: Feng | last post by:
Hi, Need help on the following issue. We need to clean up some session specific backend resource when a user ends his session. We have a "Logoff" button on the pages that handles that. But...
7
by: nyousfi | last post by:
Hi, Can someone please tell me how I can open a browser window from VB.NET code bearing in mind that I have limited permissions. I have limited permissions because the code is a Client Control...
2
by: Jean Paul Mertens | last post by:
Hello all, Can someone tell me how to programmaly (in c# asp.net) open a page in a new browser window. I was playing with Response.Redirect but a can't tell the thing he has to open a new...
17
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - How do I find the size of a browser window?...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.