timeout - Close pop up and refresh parent page javascript -


i want close pop , refresh parent after few seconds delay make sure data received. have following

function closeandrefresh(){       settimeout(function()  {      window.open('/{!currsubid}','_top'); window.location = window.location.href; return true; },5000)} 

this code refreshes parent inside popup, pop not close, rather parent shows refreshed - in pop up

so move pop outside of timeout, give name, call close, , reload.

function closeandrefresh(){         var winpop = window.open('/{!currsubid}','_top');  //load pop give name     window.settimeout(function(){         winpop.close();  //close pop         window.location.reload(true);  //refresh current page     },5000); } 

you use ajax call server , not have deal pop , wondering if pop blocker block or not knowing if call completetd. when call comes call, can reload page.


Comments

Popular posts from this blog

How can we post XML strings along with text strings in iOS -

How to run C# code using mono without Xamarin in Android? -

c# - cefsharp app remember password option -