How to force a refresh/reload

Okay, this seemed easyin principle but I'm coming up stumped.

Start with a setup program in main browser window.  It's a bunch of buttons getting their color and text from a mysql database table.

Click button to edit it, open a popup window, selecting colr, typing text, etc.  

click submit button to submit form - onsubmit, close popup, run php program to save data to database table.

When done saving data, program calls original setup screen.

Problem is it doesn't redraw becasue it is already open and the save program was called from a different window.  Can't  use opener.location.reload(); because the opup is closed before saving data commences.

How the heck can I call the setup program to show the new changes upon returning from piopup window/save process?

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ZvonkoSystems architectCommented:
You have to do two things:
1.) Give the window that needs a reaload a window name.
Like this:

2.) Open that window after update in popup response by sending this script as response:

The trick is that method with an empty URL parameter will NOT change the actual URL nor will it load the target window. It will only fetch the reference to the named window.

owenparkerAuthor Commented:
Hi Zvonko

Where/how exactly do I run/load the script in number 2 above?  I figire it's probably evident, but I can't find a place to put it that it will 'work'

ZvonkoSystems architectCommented:
"upon returning from piopup window/save process" you respond to the Popup window with the script in 2.)

After click on the Submit button you do NOT close the window but wait for the php response. The php response is ONLY the 2.) script text. The script will refresh the target window and close the popup window.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

Ray PaseurCommented:
Have you considered using an IFRAME?
owenparkerAuthor Commented:
Zvonko, I have tried to fiddle with your suggestion but am having problems.  I will detail what I have done and the results tomorrow.  Out of gas tonight.

Ray, I have never used iframes.  Could it give me the desired result?  I'm going to have to rethink this somehow if i can't get this to work.  There are a dozen other instances when I would need this exact same behaviour.  
Ray PaseurCommented:
Owen, if it were my application, I would go with the "rethink" strategy.  You don't have to write all that code to deal with pop-up windows (notoriously difficult cross-browser).  Just bring the data together in the setup window.  When someone clicks on a button to edit it, the top of the window is the button you want to edit - they do their edits and the action script saves the data into the data base, then reloads the original setup window.  You can do it all in one PHP script and the results will be a lot cleaner, less reloading, less confusing for the client, etc.

This is by no means the only way to accomplish the objective, but it simplifies the client interface, and I'm always a big fan of that! ~Ray
owenparkerAuthor Commented:
I do believe I might be getting caught up in trying to emulate other 'normal' windows apps too closely. I'm going to split the points to close this ticket, but for the record, the question/problem was not satisfactorily solved, but for now, that's... OK

owenparkerAuthor Commented:
Trying another direction...  Question not solved, but attempts worthwhile and advice was worthwhile...
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.