473,322 Members | 1,719 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,322 software developers and data experts.

get child window of an opener window

dmjpro
2,476 2GB
i want to know the numbers of child window of an opener window and their references...


is that possible in js ????????????


thanx in advance.....
Feb 24 '07 #1
3 2093
pronerd
392 Expert 256MB
i want to know the numbers of child window of an opener window and their references...

What? Could you be more specific? To get the number of child elements in JS you can do something like

var numberOfNodes=0;
var chileNodes = document.getElementById('SomeIdValue').childNodes;

for( var c = 0; c <childNodes.length; c++ ) {
numberOfNodes++;
}
Feb 26 '07 #2
dmjpro
2,476 2GB
thanx for ur reply .....


suppose i write ...

main html file
----
------
<script language = javascript>
function openwindows()
{
var win1 = window.open(url_name1);
var win2 = window.open(url_name2);
}
function getwindows()
{
//here i can get two windows and their references because i trapped them
}
</script>
-------
----------------
-------

if i don't trap the refrences then is there any function or logic by which i can get the number of child windows of an opener window ......

plz someone help me out ...

thanx in advance
Feb 26 '07 #3
acoder
16,027 Expert Mod 8TB
Unfortunately AFAIK there is nothing which holds the reference to all the open windows so you must define and keep track of the references.
Feb 27 '07 #4

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

Similar topics

9
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...
1
by: ian.michel | last post by:
I have a parent window that pushes a new window object onto an Array with the following code : OpenChild() { //totalNumWindowsCreated is global totalNumWindowsCreated =...
1
by: Spammay Blockay | last post by:
Hi all... I'm writing a Struts application, and one window pops up another, non-modal, window. What I want to do is, when the user presses a button on the child window, I want the parent...
2
by: Bostonasian | last post by:
I am trying to append options to dropdown in parent window from option items in child window. In parent window, I have following code: <script language="javascript"> function...
8
by: mike | last post by:
I have a parent window where I open a child window. In that child window I have some js that creates a row in the parent window, it looks like: if ( self.opener.document.update ) { var...
2
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...
2
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...
1
by: jerkyjerk | last post by:
Ei guys..newbie in programming..just want to ask how will I compare the contents of particular cell of the table(from parent window) to the contents of a cell of the table (child window)? how will I...
1
by: nupuragr82 | last post by:
I have a parent form and on button click I am calling a child page where i have a textbox and a button. On button click of child form I am passing the value of the Textbox to the Textbox in parent...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.