Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sending Data to Parent Window from DB child window

Status
Not open for further replies.

jeremyhache

Programmer
Sep 30, 2002
19
0
0
US
I have a page which needs to be updated through a child window. The child window is a page that just displays a table from a database. Each record has an "Apply" hyperlink next to it which reloads a copycat page on the parent window and updates certain fields. However, because I am reloading the page all the data in the form in the text boxes not being updated are cleared. How would I use this format but update the parent window rather than refreshing it??? Should I try a different approach? I found something involving an opener.document command but how would I use this with a hyperlink? THanks.
 
you can reference the parent window as "opener", so to access a form in your parent window you would say
document.opener.document.getElementById('your_form_name_here')
and then you can incert/change valus of the fields in a form. for example:
document.opener.document.getElementById('your_form_name_here').txtField.value = "some value from your child window"

HTH --------------------------------------------------
Goals are dreams with deadlines
-------------------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top