I have a little code, basically, it does a modal pop-up and once the modal pop-up is closed the page is supposed to refresh. The problem is, the first time the modal window pops up and closes the page loads fine. However, the next time you open the modal window and close it the page refreshes to the correct url, displays the page, but the page just keeps on loading forever.
Here is the code. Any suggestions?
var leftPos = (screen.availWidth-748) / 2
var topPos = (screen.availHeight-478) / 2
var cmd = 'editstory.php?id=' + bid + '&SECTION=' + sectionid;
var returnlocation = './index.php?PAGE=<?php echo $PAGE;?>&SECTION=<?php echo $SECTION; ?>';
bannerwindow = window.showModalDialog(cmd, "","dialogWidth=748px;dialogHeight=478px;status:off;");
location.href = returnlocation;