模态弹出窗口在aspx页面中首次出现和消失 [英] Modal pop up is appearing and disappearing for the first time in aspx page

查看:77
本文介绍了模态弹出窗口在aspx页面中首次出现和消失的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

模态弹出窗口仅在mozilla 4.0.1中的aspx页面中第一次出现和消失.我正在使用JavaScript进行显示.

有人可以告诉我为什么会发生Dis吗?

Modal pop up is appearing and disappearing for the first time in aspx page only in mozilla 4.0.1 .I am using a JavaScript to show this.

Can someone tell me why dis is happening?

推荐答案

如果您在上一个控件中以及在服务器端事件完成之前进行了部分回发操作,那么您正在弹出up modelpopup.由于模型pop是客户端事件,因此它会弹出,但是一旦服务器端事件完成,弹出窗口就会关闭.

您可以通过在以前的控件中放置一些超时来简单地避免此时间间隔,该控件正在执行部分回发.
例如:
1.模型弹出链接到一个按钮,点击
2.您在更新面板中有一个文本框,该文本框调用服务器端文本更改事件.


为文本框创建一个Onchange事件,并在事件中执行setTimeOut()和一秒钟.这会将您的服务器端事件延迟一秒,并确保没有其他弹出窗口打开/关闭发生.
If you are doing some partial postback operation in previous control and before the completion of the server side event , You are poping up the modelpopup. Since the model pop is client side event it pops up, but as soon as the server side event completes popup is getting closed.

You can simply avoid this time gap by putting some timeout in your previous control which is doing that partial post back.

Eg:
1.Model pop up is linked to a button click
2.You have a textbox inside an update panel which call server side text change event.


Create an Onchange event for the textbox and in the event do a setTimeOut() and one second. Which is delay you server side event to a second and it ensure that there is no other popup open/close to happen.


这篇关于模态弹出窗口在aspx页面中首次出现和消失的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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