473,624 Members | 2,127 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

return a data value to a 'parent' window?

I'm attempting to do a lookup, using a javascript-launched child window to
enable the user to select a value, then return that value to the
parent/launching window.

Pictures... to demonstrate the issue:
http://users.bigpond.net.au/stevebywaters/image1.gif shows the first window.
The operator can press the 'Select' button (to get a value to put into
'Location' entry field).
When they do, a child window is launched, showing a list of 'Sites' (and
there will be mutiple search possibilities, too).
See http://users.bigpond.net.au/stevebywaters/image2.gif

I would like the operator to be able to select the record they want, then
press a Select button, at which point the child window will close and the
Primary Key and any other relevant info of the selected record will be
returned to the underlying ('parent') window, populating the 'Location'
entry..

How to do this, esp. in ASP.NET?

Some ideas that occur to me are:
1. Set a Session variable in the child window, and read it in the parent
2. Similarly, using a cookie
3. Using client-side js, set a value in the parent window from the child
window, put it in a 'Hidden' control type, then read that field value....
don't know if this is possible, and it's not very "ASP.NET-like" <g>

I'd like to use this methodology a lot (the way I tend to in Windows apps),
so it would be good to get advice on a good, solid way to do it - my
solutions tend to be old-style classic ASP + javascript.

tia
Steve


Nov 18 '05 #1
1 2402
Your post went unanswered. Have you resolved this issue?

--
Regards,
Alvin Bruney [ASP.NET MVP]
Got tidbits? Get it here...
http://tinyurl.com/3he3b
"Steve Bywaters" <by******@bigpo nd.net.au> wrote in message
news:OQ******** ********@TK2MSF TNGP11.phx.gbl. ..
I'm attempting to do a lookup, using a javascript-launched child window to
enable the user to select a value, then return that value to the
parent/launching window.

Pictures... to demonstrate the issue:
http://users.bigpond.net.au/stevebywaters/image1.gif shows the first window. The operator can press the 'Select' button (to get a value to put into
'Location' entry field).
When they do, a child window is launched, showing a list of 'Sites' (and
there will be mutiple search possibilities, too).
See http://users.bigpond.net.au/stevebywaters/image2.gif

I would like the operator to be able to select the record they want, then
press a Select button, at which point the child window will close and the
Primary Key and any other relevant info of the selected record will be
returned to the underlying ('parent') window, populating the 'Location'
entry..

How to do this, esp. in ASP.NET?

Some ideas that occur to me are:
1. Set a Session variable in the child window, and read it in the parent
2. Similarly, using a cookie
3. Using client-side js, set a value in the parent window from the child
window, put it in a 'Hidden' control type, then read that field value....
don't know if this is possible, and it's not very "ASP.NET-like" <g>

I'd like to use this methodology a lot (the way I tend to in Windows apps), so it would be good to get advice on a good, solid way to do it - my
solutions tend to be old-style classic ASP + javascript.

tia
Steve


Nov 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
8169
by: Lee | last post by:
I am using a modal window and an iFrame to try and pull a return value back. I am doing this across domains. I have the value returned from the modal window to the iFrame window but I can not get the value returned to the parent window. The alert in the parent window always returns undefined errors. Any help would be much appreciated. I call the modal window and wait for the return as such: function LCC()
2
7079
by: John | last post by:
Hi all, I have a modal dialog window from which a user selects a few rows from a datagrid and then clicks on an image button. My question is two-fold: 1. How do I post data back to the same dialog window? 2. The dialog window in question was, in turn, created from a dialog window. I need to post data back to that one too (that which the user selected in the top-most dialog window). How do I send data back to this window?
2
12567
by: Cheryl | last post by:
Hi, I have encounter a problem.Language use is C#. I would like to open a new window (is a modal window, where I m not able to switch from parent window after this window is open)from the parent window , where there are 3 dropdownlists and a "OK" button. Upon clicking the button, this window will close and the select of the dropdownlists will be collect and send back to the parent window. But I am do not know how to do it. Can...
3
377
by: Jeremy | last post by:
What would it take to create a pop-up window that displays some graphics (each with a bit of text). Ideally it would behave such that when a user clicks on a graphic, the pop-up window disappears and some data (e.g., some ID value of the graphich clicked) is then returned to the window from which the pop-up was opened? Thanks
6
8140
by: Mark Goldin | last post by:
I have main aspx page with a button that will show a modal dialog in the Browser when a user clicks on the button. On the modal form the user will do some selections. The he will submit his selections to the server via a postback. How can I take these selections to the main page? Thanks
1
3005
by: ABC | last post by:
I has a parent and a popup lookup ASP.NET Form. Both has javascript. I test the popup window's window.Form1.SelectedProductCode.value has a value. But don't know why the return variable "retvar" has not any value pass from popup? -- Parent Windows Script function DoSelectProductCode() { var selectedstr = "";
1
4344
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 it does not work. Parent window: user clicks on button or link to open a child window. Child Window: child opens and shows a browse file field. Upon submit, child window refreshes and actually loads a second .asp page in the child. This...
1
2123
by: darla0520 | last post by:
Hi, Please anyone help me, I have a datagrid on my child window wherein I have to return the value of the datagrid on the parent window when I click the link button. Or do you have any sample code that return value from datagrid to parent window.... please need help. Please help me...
1
6146
by: Mel | last post by:
Hi! I have two text boxes and two image buttons. When I click image button 1 or 2 the same popup window is displayed (using 'window.open' method). When I click image button 1 the returning data from the popup window is placed in text box 1 on the parent form. When I click image button 2 the returning data is placed in text box 1 also. It should be placed into text box #2 on the parent form. How do I change my javascript code so the...
0
8234
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, 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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8677
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, 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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8620
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8474
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 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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7158
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5563
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4079
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2605
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
2
1482
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.