473,406 Members | 2,220 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,406 software developers and data experts.

passing data from a child window to a parent window

Say for example, i have rows of input textboxes and i would like to pass different data from a popup window. How should I do it?
Oct 4 '07 #1
4 1627
dmjpro
2,476 2GB
Say for example, i have rows of input textboxes and i would like to pass different data from a popup window. How should I do it?
Expand|Select|Wrap|Line Numbers
  1. var child_win = null;
  2. child_win  = window.open(...);
  3. .
  4. .
  5. .
  6. function access_child_values()
  7. {
  8.  if(typeof child_win){
  9.   var val1 = child_win.document.forms["form_name"].elements["element_name"].value;
  10.   .
  11.   .
  12.  }
  13. }
  14.  
Kind regards,
Dmjpro.
Oct 4 '07 #2
could you explain your code. and is there any other way besides that?
Oct 4 '07 #3
dmjpro
2,476 2GB
Expand|Select|Wrap|Line Numbers
  1. var child_win = null;
  2. child_win  = window.open(...);
  3. .
  4. .
  5. .
  6. function access_child_values()
  7. {
  8.  if(typeof child_win){
  9.   var val1 = child_win.document.forms["form_name"].elements["element_name"].value;
  10.   .
  11.   .
  12.  }
  13. }
  14.  
Kind regards,
Dmjpro.
Expand|Select|Wrap|Line Numbers
  1. var child_win = null;
  2. child_win  = window.open(...);
  3. //here it opens a new window and having that window reference
  4. .
  5. .
  6. .
  7. function access_child_values()
  8. {
  9.  if(typeof child_win){ //check whether child window opened or not
  10.   var val1 = child_win.document.forms["form_name"].elements["element_name"].value;
  11. //here form_name is the form name of child window
  12. //and element_name is element name of child window
  13.   .
  14.   .
  15.  }
  16. }
  17.  
Anything more buddy :-)

Kind regards,
Dmjpro.
Oct 4 '07 #4
Expand|Select|Wrap|Line Numbers
  1. var child_win = null;
  2. child_win  = window.open(...);
  3. //here it opens a new window and having that window reference
  4. .
  5. .
  6. .
  7. function access_child_values()
  8. {
  9.  if(typeof child_win){ //check whether child window opened or not
  10.   var val1 = child_win.document.forms["form_name"].elements["element_name"].value;
  11. //here form_name is the form name of child window
  12. //and element_name is element name of child window
  13.   .
  14.   .
  15.  }
  16. }
  17.  
Anything more buddy :-)

Kind regards,
Dmjpro.
Thank you very much sir. I'll try it on my program.
Oct 4 '07 #5

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

Similar topics

11
by: Mike M | last post by:
Is it possible? In the parent process, I have a socket that binds, listens and then accepts new connections (which creates new sockets in the process). I want to be able to pass some of these new...
1
by: Joe D | last post by:
I think this is a simple question. But I am new to JS. Here is what I want to do: From a parent window, open a popup window (child) to get data from user, then user submit the request, close the...
4
by: John MacIntyre | last post by:
Hi, I have a page with a series of child pages loaded into an iframe. When I move from page to page, I store an object containing the child's control data in a variable on the main page, then...
1
by: Reinhold Mannsberger | last post by:
Hello I want to pass data from one page to another, more specifically I want to pass data from a child page to a parent page My parent page (parentpage.htm) does ----...
1
by: DavidS | last post by:
I have parent.aspx web page from which I call a modal dialog (child.aspx via showmodaldialog). I'd like to populate two text boxes, <asp:TextBox id=txt_HN> on the child form with data from the...
1
by: mark | last post by:
I have a main form, and i have another form i need to call on a button press, then id like the result of the child form to pass data back to the parent - without losing any data previously entered...
1
by: wlevins | last post by:
I have a simple script which has worked flawlessly for years - it copies a bit of data from a child window down into a form field in the parent window that opened the child. But now in Firefox 2.0...
1
by: pingalkar | last post by:
Hi, In my application, I call one popup winodow by using this link.. <a href="#" onClick="return showWindow('1','XYZ');"> <img src="images/magnifier.gif" ALT="Chemicals"...
1
by: btreddy | last post by:
Hii all.., I have one query not able to find a solution. I've one javascript page(parent)on which upon clicking one link it willopen one more page(child page). here my question is how to...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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
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.