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

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 2388
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******@bigpond.net.au> wrote in message
news:OQ****************@TK2MSFTNGP11.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
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...
2
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...
2
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...
3
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...
6
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...
1
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"...
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: 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...
1
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...
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
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
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
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...
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...

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.