I have a parent window that pushes a new window object onto an Array
with the following code :
OpenChild()
{
//totalNumWindows Created is global
totalNumWindows Created = totalNumWindows Created + 1;
childWnds.push( window.open(lin k, "child" +
totalNumWindows Created,"depend ent"));
..
..
..
}
This pops up a new window with every call. In the child window I call
a parent function onbeforeunload, appClose() :
function appClose(){
if (window.opener && !window.opener. closed){
window.opener.C loseChild(getQu eryString("appl ication"));
}
}
This is in my frameset tag of the child code :
<frameset ... onbeforeUnload= 'appClose()'>
The window.opener.C loseChild() function is called perfectly when I have
one child window open, but as soon as I create another child window
both of the open child windows don't ever call it. They do both go
into the onbeforeunload appClose() function, but do not call the
window.opener.C loseChild() function inside of this routine.
Anyone have any ideas why when I have two child windows open I can't
access the window.opener functions?
I have tried taking each new window out of the array and used the
following code in CloseChild() :
CloseChild()
{
//win and totalNumWindows Created are both global
totalNumWindows Created = totalNumWindows Created + 1;
var win = window.open(lin k, "child" +
totalNumWindows Created,"depend ent");
..
..
..
}
All to no avail...
Thanks for the help in advance,
Ian Michel 1 4550
<ia********@gma il.com> wrote Anyone have any ideas why when I have two child windows open I can't access the window.opener functions?
Sorry, no idea. what does alert(window.op ener) tell you ?
I have tried taking each new window out of the array and used the following code in CloseChild() :
CloseChild() { //win and totalNumWindows Created are both global
totalNumWindows Created = totalNumWindows Created + 1; var win = window.open(lin k, "child" + totalNumWindows Created,"depend ent");
Because of the "var" keyword the variable win looks awefully local to me.
Not sure how it relates to the described problem tho :-(.
--
Ivo This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Randell D. |
last post by:
Folks,
I'm working on a contact name/address database whereby a slimed down list is
shown in the main window. When a record is selected, the complete record is
displayed in a new window via a call to window.open
As opposed to closing and re-opening new windows, I would prefer that when
the user is finished reading the complete record,...
|
by: Raj |
last post by:
Hi All,
I have a problem with trying to refresh the parent window from
child window in order to update data in the parent window.
The sequence of events are
1) I click a button in the parent window to open a child window thru
javascript
window.open
2) I have some functionality in the child window that changes the data
|
by: MrFez |
last post by:
I have an webform from which I open a child window to display a calendar.
When a date is selected in the calendar window it attempts to set the value
of a textbox in the main (parent) window by using the window.opener property
to reference the textbox.
Everything works fine initially. However if the the main window does a
postback and the...
|
by: Bill Borg |
last post by:
Hello all,
Simple chat app, where the site owner has a master window with all requests
for chat, status of each room, etc., and child windows for each separate chat
in which the owner is engaged. When the owner closes one of his child
windows, I want to update the master window.
I understand "reasonably" well how to go about this. The...
|
by: Arnaud Diederen |
last post by:
Hi,
Let's say I have a webapp 'root' window into which I include all
my important JavaScript, including functions that I use as
constructors. Let's say I have a 'class' whose constructor is
'Konstructor'. (weird name, but it's only for the example)
If, from this root window, I create a new window
| |
by: M B HONG 20 |
last post by:
Hi all -
I am working on a web application and have run into a problem. From a
main window (Window1) I open a child window (Window2), and from that
child window I open a grandchild window (Window3). I need to call a
funcion that resides on Window1 from Window3. I do this successfully
by calling a function with window.opener on Window3,...
|
by: adamredwards |
last post by:
I have a page with some form elements that are dynamically generated.
They are inserted into the dom by first cloning a node, changing the
values like name, and then inserted with insertBefore().
When a field gets added, a link that opens a popup window is next to
it. The popup is opened and has the name of the parent element it
should...
|
by: Buddha |
last post by:
Hello,
I posted this on two forums, without too much help .. and I am kinda
stuck in this.
I need to refresh the parent page from the second child window which
is opened by the first child and the first child window closes after
opening the second child.
This is the second time I am typing the post, I lost all content
because the site...
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language...
|
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it. ...
| |
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
|
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |