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

passing data from a child window to different textboxes of its parent

What I want to do is be able to open a popup window that may pass data to different rows of textboxes of its parent window.

I want to pass data to different rows of textboxes and each row has a different set of values. How can I do it? Through a function? Through conditional statements? Through creating one popup window for each row of textboxes?

I really need an answer ASAP. thanks.
Oct 8 '07 #1
6 3775
dmjpro
2,476 2GB
What I want to do is be able to open a popup window that may pass data to different rows of textboxes of its parent window.

I want to pass data to different rows of textboxes and each row has a different set of values. How can I do it? Through a function? Through conditional statements? Through creating one popup window for each row of textboxes?

I really need an answer ASAP. thanks.
You can access the parent window variables using .............

Expand|Select|Wrap|Line Numbers
  1. opener....................
  2.  
Debasis Jana
Oct 8 '07 #2
You can access the parent window variables using .............

Expand|Select|Wrap|Line Numbers
  1. opener....................
  2.  
Debasis Jana
What I want to do is pass values to different text boxes. like that of a tigra javascript popup calendar.
Oct 9 '07 #3
dmjpro
2,476 2GB
What I want to do is pass values to different text boxes. like that of a tigra javascript popup calendar.
Parent page Scripting.
Expand|Select|Wrap|Line Numbers
  1. var ref = window.open(....); //this is the child window
  2. .
  3. .
  4.  
Child page Scripting.
Expand|Select|Wrap|Line Numbers
  1. opener.document.forms["form_name"].elements["element_name"].value = document.forms["form_name"].elements["element_name"].value
  2. //you are assigning here child value to parent value.
  3.  
Enjoy the code.

Debasis Jana
Oct 9 '07 #4
Parent page Scripting.
Expand|Select|Wrap|Line Numbers
  1. var ref = window.open(....); //this is the child window
  2. .
  3. .
  4.  
Child page Scripting.
Expand|Select|Wrap|Line Numbers
  1. opener.document.forms["form_name"].elements["element_name"].value = document.forms["form_name"].elements["element_name"].value
  2. //you are assigning here child value to parent value.
  3.  
Enjoy the code.

Debasis Jana
I meant passing different sets of values for different rows of textboxes.

say for example, I want to pass item_code, description, and price to textbox set 1. and a different item_code, description, and price to the next row of textbox. How should it be done?
Oct 9 '07 #5
dmjpro
2,476 2GB
I meant passing different sets of values for different rows of textboxes.

say for example, I want to pass item_code, description, and price to textbox set 1. and a different item_code, description, and price to the next row of textbox. How should it be done?
Post your code you tried so far.

Debasis Jana
Oct 9 '07 #6
Could you kindly tell me how I can use a much simpler code than having to do this:

Expand|Select|Wrap|Line Numbers
  1. if(self.opener.document.form1.item_code1.value==""){
  2. self.opener.document.form1.item_code1.value=document.form1.item_code.options.[document.form1.item_code.selectedIndex].value;
  3. self.opener.document.form1.description1.value=document.form1.description.options.[document.form1.item_code.selectedIndex].value;
  4. }
  5. else
  6. {
  7. if(self.opener.document.form1.item_code1.value!="" && self.opener.document.from1.item_code2.value==""){
  8. self.opener.document.form1.item_code2.value=document.form1.item_code.options.[document.form1.item_code.selectedIndex].value;
  9. self.opener.document.form1.description2.value=document.form1.description.options.[document.form1.item_code.selectedIndex].value;
  10. }
  11. }
  12.  
Oct 11 '07 #7

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

Similar topics

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 ----...
12
by: Mike | last post by:
I'm calling a component to get my data. The component is returning a dataset. I need to populate text boxes on my aspx page with the data within the datalist. Where can I find an example that...
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...
0
by: ssrivani | last post by:
hi all, I have a parent window default.aspx which has a textbox(txtBox1) with multiline property and a button.when the button is clicked a child window pops up child.aspx. I have four textboxes...
9
by: Anil Gupte | last post by:
After reading a tutorial and fiddling, I finally got this to work. I can now put two tables created with a DataTable class into a DataRelation. Phew! And it works! Dim tblSliceInfo As New...
4
by: backups2007 | last post by:
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?
1
by: varunvashishth | last post by:
hi, I'm facing a problem with displaying a child jsp on top of parent jsp. on clicking a link in parent jsp the child jsp opens up and it has some list of values and other textboxes which gets...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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...
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.