Return value to parent page from popup

  • Thread starter Thread starter Kevin Attard
  • Start date Start date
K

Kevin Attard

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
 
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 said:
How do you open the popup? With showModalDialog?

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]


Kevin Attard said:
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
 
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 said:
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 said:
How do you open the popup? With showModalDialog?

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]


Kevin Attard said:
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
 
Back
Top