关闭java脚本window.ShowModelPopup()退出时不会触发页面加载事件 [英] Page Load event not firing while closing java script window.ShowModelPopup() exit

查看:63
本文介绍了关闭java脚本window.ShowModelPopup()退出时不会触发页面加载事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我在父页面中调用模型弹出窗口(在文本框中双击事件)。我在模型弹出窗口中显示复选框列表,如果用户选择了一些复选框并关闭模型弹出窗口。然后我需要使用复选框选中的字符串在父页面页面加载事件中执行一个方法。我在数组中返回检查的字符串。我在父页面中使用脚本管理器和内容模板。



问题是当我退出window.ShowModelPopup()子窗口时页面加载事件没有触发。我尝试了很多使用谷歌搜索。但我无法得到解决方案。



我尝试了以下方式:

 window.opener.Refresh();  //   not working  
window.opener.locaiton.reload(); // 不工作



 function Refresh(){
__doPostBack(' UpdatePanel1'' ');
} // 无效



任何身体请给我一个主意。如何解决这个问题?

提前谢谢。

解决方案

嘿那里,



你应该在你使用 window.showModalDialog 之后放置 window.location.reload(); 这一行



赞:

 窗口。 showModalDialog('  YourPage.aspx'); 
window location .reload();





希望有所帮助。



Azee ..


Hi all,
I am calling model popup in my parent page (in a textbox double click event). I am showing checkbox list in the model popup window, if user select some of the checkboxes and close the model popup window. Then i need to execute a method in parent page page load event by using the checkbox checked string. I return the checked string in an array. I am using Script Manager with content template in parent page.

The problem is the page load event not firing when i exit the window.ShowModelPopup() child window. I tried alot using google search. but i am unable to got the solutions.

I tried in the below ways:

window.opener.Refresh();//not working
window.opener.locaiton.reload();//not working


function Refresh() {
           __doPostBack('UpdatePanel1', '');
       }// not working


Any body please give me an idea. how to slove this?
Thanks in advance.

解决方案

Hey there,

you should place the line window.location.reload(); right after where you used window.showModalDialog

Like:

window.showModalDialog('YourPage.aspx');
 window.location.reload();



Hope it helps.

Azee...


这篇关于关闭java脚本window.ShowModelPopup()退出时不会触发页面加载事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆