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

Return value to parent page from popup

Hi,

Is there a way to return a value from a control inside a popup and assign it
to a control inside the parent form?

Thanks,
kev


Oct 30 '06 #1
3 2288
How do you open the popup? With showModalDialog?

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
"Kevin Attard" <ke***@holisticrd.com.nospamwrote in message
news:uV**************@TK2MSFTNGP05.phx.gbl...
Hi,

Is there a way to return a value from a control inside a popup and assign
it to a control inside the parent form?

Thanks,
kev


Oct 30 '06 #2
currently
btnSelectPerson.Attributes.Add("onclick",
"window.open('Persons.aspx',null,'height=600, width=800,status= no,
resizable= yes, scrollbars=yes, toolbar=no, location=no, menubar=no');");

"Eliyahu Goldin" <RE**************************@mMvVpPsS.orgwrote in
message news:%2****************@TK2MSFTNGP02.phx.gbl...
How do you open the popup? With showModalDialog?

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
"Kevin Attard" <ke***@holisticrd.com.nospamwrote in message
news:uV**************@TK2MSFTNGP05.phx.gbl...
>Hi,

Is there a way to return a value from a control inside a popup and assign
it to a control inside the parent form?

Thanks,
kev



Oct 30 '06 #3
A page opened with a window.open call gets a reference to the page that
opened it in window.opener property. You can call a javascript function as

window.opener.setPopupResults ("ok");

where setPopupResults is a javascript function you can write for accepting
string values from the popup. Depending on your requirements, this function
can set the control value on client side or pass the value on to the server
to finish the job there.

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
"Kevin Attard" <ke***@holisticrd.com.nospamwrote in message
news:ew*************@TK2MSFTNGP04.phx.gbl...
currently
btnSelectPerson.Attributes.Add("onclick",
"window.open('Persons.aspx',null,'height=600, width=800,status= no,
resizable= yes, scrollbars=yes, toolbar=no, location=no, menubar=no');");

"Eliyahu Goldin" <RE**************************@mMvVpPsS.orgwrote in
message news:%2****************@TK2MSFTNGP02.phx.gbl...
>How do you open the popup? With showModalDialog?

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
"Kevin Attard" <ke***@holisticrd.com.nospamwrote in message
news:uV**************@TK2MSFTNGP05.phx.gbl...
>>Hi,

Is there a way to return a value from a control inside a popup and
assign it to a control inside the parent form?

Thanks,
kev




Oct 30 '06 #4

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

Similar topics

2
by: Bill S. | last post by:
Hey, I am trying to figure this out. The hyperlinks on my page open up a small popup window. I have no reason to refresh the parent page or what have you. I was living in a very happy world,...
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...
4
by: Earl Teigrob | last post by:
I am thinking about using a popup window to edit settings that will affect parent asp.net page. The data that is changed in the popup window will be saved to the datastore that is loaded and...
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: ctbang | last post by:
I have a JSP page with a form containing 2 text fields (infact there are many) and I want to add the feature of a help button (instead of drop down). On clicking the button it should popup a jsp...
7
by: Ben Schumacher | last post by:
How can I refresh the parent page from a popup window that was created using window.showmodaldialog? I would like to accomplish this using vbscript if possible.
3
by: Joe | last post by:
I need to popup a window, allow the user to select an image, update the parent window with this new value (requires a refresh) and then close the child window. Are there any examples of...
2
by: Bam | last post by:
Hey gang. I have searched the web, and can't find what i need. hoping someone here can help i have a form that pops up based on a click. the popup opens up correctly. now what i want it to do is...
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: 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?
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
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
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...

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.