日期:2014-05-17  浏览次数:20529 次

关闭弹窗重新绑定listview问题
listview是在后台绑定数据源的,想在关闭弹窗的时候绑定下listview让新加入的数据显示出来

------解决方案--------------------
1 父窗口:
<script type="text/javascript">
function openBrWindowInCentre(theURL,width,height) {
      var left, top;
      left = (window.screen.availWidth - width) / 2;
      top = (window.screen.availHeight - height) / 2;
      var per = 'width=' + width + ',height=' + height + ',left=' + left + ',top=' + top + ',screenX=' + left + ',screenY=' + top;
      window.open(theURL,'',per);
    }
</script>
<a href="javascript:void(0)" onclick="openBrWindowInCentre('child.html','600','400');">打开子窗口</a> 

2. 子窗口 
< script language="JavaScript" type="text/javascript"> 
< !-- 
function refreshParent() { 
window.opener.location.href = window.opener.location.href; 
if (window.opener.progressWindow) 

window.opener.progressWindow.close(); 

window.close(); 
} //--> 
< /script> 

< a href="javascript:void(0)" onclick="refreshParent()">刷新父窗口并关闭当前窗口</a>