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

passing values between child and parent windows

17
Hi
I am uing C#.net & using javacript for a popup window.

I've a form and there is a button named Categories. When it is clicked, it will open a new window for the selection of categories.
When the categories are selected from ListBox ,and the submit button of the popup window is clicked, the category id value should be set in the parent form and the popup window will close.

the problem is that the parent window form doesn't get the value of the selected listbox item of popup window.

Anyone plz help me out.
Sep 26 '06 #1
4 12549
neena
17
anyone please tell me how to pass the selected value from a listbox in popup window(child window) to a textbox in parent window

please help me...i am new in javascript
Sep 26 '06 #2
ronverdonk
4,258 Expert 4TB
Assuming:
Mainform is the form name in the main window,
Name_field is the text box where the value must be placed,
ChildForm is the form name in the child window,
Name_field is the name of the select group:
[HTML]opener.document.forms["Mainform"].Name_field.value =
ChildForm.Name_field.options[ChildForm.Name_field.selectedIndex].value[/HTML]

Ronald :cool:
Sep 27 '06 #3
neena
17
Thank u Ronald for replying.its working now.But how will i get the values to the listbox from database.If its server control then its ok.But in javascript how will we get the values?

Please reply

Neena

Assuming:
Mainform is the form name in the main window,
Name_field is the text box where the value must be placed,
ChildForm is the form name in the child window,
Name_field is the name of the select group:
[HTML]opener.document.forms["Mainform"].Name_field.value =
ChildForm.Name_field.options[ChildForm.Name_field.selectedIndex].value[/HTML]

Ronald :cool:
Sep 30 '06 #4
I'm afraid that the basic answer is you can't. Javascript cannot communicate with server side databases.
Oct 13 '06 #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...
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: cirillo_curiosone | last post by:
Hi, i'm new to javascript. I started studing it on the web few weeks ago, but still haven't been able to solve one big problem: HOT TO PASS VALUES FROM A SCRIPT VARIABLE TO A CHILD HTML...
4
by: eBob.com | last post by:
I have a "parent" form (if that's the right terminology), Form1. I declare two public values in the parent form : Public Class Form1 Inherits System.Windows.Forms.Form Public CurDir As String =...
3
by: luna | last post by:
i have a parent form which opens a child form, i need to pass a variable back to parent then reload parent so parentopens child, child passes to parent, child closes, parent reloads its only...
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...
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: jiaudheen | last post by:
hi i have a multiline textbox and a button in parent form. in the child form i have text boxes,comboboxes,button. the thing is i click the button in the parent form ,the child form opens. i fill the...
6
by: raylopez99 | last post by:
This thread is about how variables or parameters (including objects) are passed between forms (namely, using parameterized constructors, e.g., to pass an int between forms (e.g., a calling form and...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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
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...

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.