Asp.net ModalPopupExtender 在回发期间闪烁

发布于 2024-11-30 05:17:40 字数 522 浏览 2 评论 0原文

我正在开发一个 Web 应用程序,它要求我使用我最近在用户控件中制作的模态弹出窗口。一切都按预期工作,但不知何故,在回发之后,而不是总是,模式中使用的面板在屏幕上非常短暂地闪烁(闪烁)。 我在数十个论坛上读到,说我需要添加“display:none;”到该面板的样式标签。这通常“有帮助”,并且大多数回发不显示面板,但有些会显示。似乎该属性以某种方式被忽略,但我找不到在哪里、如何、何时。

我还尝试使用 firebug 调试 javascript,测试所有页面事件,甚至尝试查看 ajax modalpopupextender 源代码,但无法解决此问题。 我必须让这个 Web 应用程序运行的浏览器是 Mozilla Firefox 3.5.10,这是我工作的公司的当前版本。由于公司政策,这一点无法更改。

由于这种闪烁引起的质量和用户体验问题,我将其保留原样,因此如果有人可以帮助我,我将不胜感激。我的日程安排也相当紧张,因此任何快速帮助也将不胜感激,因为我已准备好随时尝试和测试更改。

如有任何疑问或疑问,请告诉我。

提前致谢。

I'm working on a web application that requires me to use a modalpopup I recently made within a user control. Everything works as expected, but somehow after a PostBack, and not always, the panel used in the modal flickers (blink) on the screen very briefly.
I have read on dozens of forums saying that I needed to add "display:none;" to the style tag of this panel. This usually "helps", and most of the postbacks don't show the panel, but some do. Seems that the property is being ignored somehow, but I can't find where, how, when.

I have also tried debuging the javascript with firebug, tested all page events and even tried taking a look at the ajax modalpopupextender sourcecode, but couldn't fix this issue.
The browser I HAVE to make this web application work is Mozilla Firefox 3.5.10, that is the current version on the company I work for. This can't be changed due to corporate policies.

Due to quality and user experience issues that arise with this flickering, I leave it as is, so if anyone can help me out I'd appreciate that. I'm also on a rather tight schedule, so any quick help will be appreciated too, as I'm ready to try and test changes on the go.

Please let me know of any doubts or questions.

Thanks in advance.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

梦回旧景 2024-12-07 05:17:40

如果您的 CSS 位于外部文件中,则可能会在下载 CSS 之前加载并渲染 HTML,从而导致闪烁。如果是这种情况,那么直接将 style="display:none" 添加到 HTML 标记应该可以解决此问题。

If your CSS is in an external file, it's possible that the HTML is being loaded and rendered before the CSS is downloaded, causing the flicker. If this is the case, then adding style="display:none" directly to the HTML tag ought to fix it.

极度宠爱 2024-12-07 05:17:40

以下对我有用:

<script type="text/javascript">
    window.onbeforeunload = function () {
        document.getElementById("PanelDialog").style.display = "none";

    }
</script>

The following works for me:

<script type="text/javascript">
    window.onbeforeunload = function () {
        document.getElementById("PanelDialog").style.display = "none";

    }
</script>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文