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

generate popup for search, then populate parent window with selection

Any suggestions on how to go about generating a popup, giving the user a way
of searching for something, and then taking their selection after closing
the pop-up and populating the parent form with the selection from the child?
I can do everything up until the point of having to populate the parent form
with the selection from the child form. How do I put the information back
into the parent so that the asp.net code in the parent can actually retrieve
what the user selected in the child?

JavaScript is the answer, but a snippet of code and/or a link to an example
would be great! Thanks in advance.

Mark
Nov 18 '05 #1
2 2463
Mark,

The easiest way to do this is to send the information back to the original
window in the query string. You may use a javascript window.open command to
"re-open" the original window. The trick to making the javascript re-use the
original window is to name the original window and then target that window
name with the window.open command.

So:

Place a javascript in your original page like this:

<script language="JavaScript">
<!-- Begin
name='first';
// End -->
</script>

Then in your popup when you call the orignal page:

<script language="JavaScript">
<!-- Begin
window.open('FirstPage.aspx?info=[your querystring info
here...]&moreinfo=[more querystring info here...]', 'first')

window.close()

// End -->
<script language="JavaScript">
Since the javascript in the popup opens a window named: "first" it
automatically re-uses the already opened "first" window, then closes itself.

Hope this helps!

If you have any questions let me know.

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

Free code library at:
www.aboutfortunate.com

"Out of chaos comes order."
Nietzche
"Mark" <mf****@idonotlikespam.cce.umn.edu> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
Any suggestions on how to go about generating a popup, giving the user a way of searching for something, and then taking their selection after closing
the pop-up and populating the parent form with the selection from the child? I can do everything up until the point of having to populate the parent form with the selection from the child form. How do I put the information back
into the parent so that the asp.net code in the parent can actually retrieve what the user selected in the child?

JavaScript is the answer, but a snippet of code and/or a link to an example would be great! Thanks in advance.

Mark

Nov 18 '05 #2
Query string - great idea. Thanks Justin!

Mark

"S. Justin Gengo" <sj*****@aboutfortunate.com> wrote in message
news:OR**************@TK2MSFTNGP12.phx.gbl...
Mark,

The easiest way to do this is to send the information back to the original
window in the query string. You may use a javascript window.open command to "re-open" the original window. The trick to making the javascript re-use the original window is to name the original window and then target that window
name with the window.open command.

So:

Place a javascript in your original page like this:

<script language="JavaScript">
<!-- Begin
name='first';
// End -->
</script>

Then in your popup when you call the orignal page:

<script language="JavaScript">
<!-- Begin
window.open('FirstPage.aspx?info=[your querystring info
here...]&moreinfo=[more querystring info here...]', 'first')

window.close()

// End -->
<script language="JavaScript">
Since the javascript in the popup opens a window named: "first" it
automatically re-uses the already opened "first" window, then closes itself.
Hope this helps!

If you have any questions let me know.

--
Sincerely,

S. Justin Gengo, MCP
Web Developer / Programmer

Free code library at:
www.aboutfortunate.com

"Out of chaos comes order."
Nietzche
"Mark" <mf****@idonotlikespam.cce.umn.edu> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
Any suggestions on how to go about generating a popup, giving the user a

way
of searching for something, and then taking their selection after closing the pop-up and populating the parent form with the selection from the

child?
I can do everything up until the point of having to populate the parent

form
with the selection from the child form. How do I put the information back into the parent so that the asp.net code in the parent can actually

retrieve
what the user selected in the child?

JavaScript is the answer, but a snippet of code and/or a link to an

example
would be great! Thanks in advance.

Mark


Nov 18 '05 #3

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

Similar topics

4
by: Andrew Alger | last post by:
ok i have two forms. Customer.aspx and Parent_Searh.aspx. There is a button on Customer.aspx that when executed runs javascript code to open up parent_search as a popup. After the user searches...
4
by: Davey | last post by:
I have a website which has a popup window (this only opens when the user chooses to open it). In the popup window I have a <select> control which lists a selection of "classes". Each class has a...
5
by: Audrius | last post by:
Hello everybody, I have one page with <select> list in it, which opens a popup with another <select> list. Those two list are linked... When I select something in the list that is in popup...
0
by: Steve | last post by:
C# windows I have a simple(ish) enquiry screen. on this I have a search button. I want the search window to popup as a seperate non-modal window, allow the user to search and display the...
1
by: Jéjé | last post by:
Hi, I'm looking for a control to open window to allow the user to search and select an item. I have one in place, but there is a lack of options and stability. So I'm looking for a control on...
1
by: chuckdfoster | last post by:
How do you send info from popup window to a parent? From the parent, the user click a link and a popup window appears with a calendar in it. I want them to click the date in the popup and...
4
by: neena | last post by:
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...
3
by: Victor | last post by:
Hi guys. I want to implement a customized user webcontrol (.ascx). Inside this control I have a dropdownlist and a button. when user click the button, it will open a pop up window(not Ajax popup...
3
by: DrKen | last post by:
I need to have a user be able to click a link or button that brings up a popup window. When the user selects an item from the drop down list on the popup window (should I require only a click of...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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...
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
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
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
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,...

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.