Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
11-19-2010, 08:22 PM #1
- Join Date
- Nov 2010
- Thanked 0 Times in 0 Posts
Refresh parent when popup get submitted
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.
11-19-2010, 11:31 PM #2
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,
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.