Code:
function mywindowopener()
myvar=dhtmlwindow.open( 'w2','ajax' ...my parameters...)
myvar.onclose=function(){
setTimeout(function(){window.location.reload(true);},100);
}
setTimeout only executes once, but is delayed. I think you are confusing this with setInterval. Even setInterval would work here, as once a page is refreshed, the interval ends.
However, if you want to reload the page, yes that will return it to its normal first load state, except that any server side and javascript cookie data that the page is configured to respond to, if any of that has been updated, the page will now respond to that updated data.
But that will only reload the page that this code is on. If you want to reload another page, you must have a reference to it, and you must execute its refresh before the page that is refreshing its window closes.
So, you might want to have:
Code:
function mywindowopener()
myvar=dhtmlwindow.open( 'w2','ajax' ...my parameters...)
myvar.onclose=function(){
window.opener.location.reload(true);
setTimeout(function(){window.close();},100);
}
It's a little confusing because I'm not clear on what type of window(s) you are referring to, actual and/or virtual, or where the code is and what window object(s) it is supposed to do what to.
If you need more help:
Please post a link to the page on your site that contains the problematic code so we can check it out.
Bookmarks