View Full Version : Refresh parent when popup get submitted

11-19-2010, 08:22 PM
I'm using submodal-1.6 for popup.

When the popup closes I wanted parent page to refresh.I've tried the following

All works for IE, but when coming to mozilla ,firefox the refresh is a step delayed, i.e when I open my popup to add an itme to my cart on parent page ,for the first time it does not show anything , but when I try to add another item , the first one shows.

Any advice would be really great.

Old Pedant
11-19-2010, 11:31 PM

If submitting the popup is making a change in your database, then possibly you have a race condition. The main page is reloaded before the db contents have changed.

If that's the case, there are a couple of solutions.

The best may be to have the popup *not* try to reload the parent until the server comes back saying "done" to the DB operation. Since your popup code (I call it a "popON", since it's all in the same window) is in an <iframe>, just have the <form> submit to a page that comes *back* to the <iframe> with the JS code to reload the parent.

But showing code is usually the best way to get help. When you don't all we can do is guess.

Since submodal is just a <div> on the same page,