Link to home
Start Free TrialLog in
Avatar of juststeve
juststeve

asked on

Refresh the parent from child action

I'm opening a new window via the target tag of an anchor (target="addMember"). This child is a form that adds a new entry to the listing of the members on the parent page. I'd like to be able to have the parent page automatically refresh itself when the child submits it's form.
ASKER CERTIFIED SOLUTION
Avatar of Zvonko
Zvonko
Flag of North Macedonia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
i suggest

<form onSubmit="setTimeout('opener.location.reload(1)',1000);">
Avatar of VincentPuglia
VincentPuglia

Hi,

  Why submit from the child if you are going back to opener anyway?  Why not simply update the opener with the new data, close the pop up, and then submit from the opener (if necessary)

see this link:

http://members.aol.com/grassblad/html/selPop.html

for an example.

Vinny
Hi,

       i did the same thing. But there are issues if you refresh the parent if there is an element and  value enter by the user before you open popup, you have to take care of the parent form value before you refresh.

if you want to update parent when the popup submits write the code in popup form like this:

popup.asp

<body onunload = "opener.window.location.reload(true);">

or you can use this opener.window.location.reload(true); syntax in popup update.asp file.


Hope it will help.

but onunload will fire even if you just refresh the popup or navigate to another page.