繁体   English   中英

在开始加载aspx页面之前显示模式弹出消息

[英]Display a modal popup message before an aspx page starts loading

我有一个.aspx页,用于计算员工电话。
数据是从Active Directory中读取的,需要5分钟才能显示列表。
我需要显示一个Modal弹出消息,以提醒用户等待时间。
我遵循了互联网搜索中的各种示例,其中一些示例

      $(document).ready(function() {alert ("it will take 5 minutes")});

要么

windows.onload

但没有任何效果,因为它们在页面开始加载之前没有及时显示。
我发现的所有消息示例在我的情况下根本不显示,或者5分钟后与PDF列表同时显示。

请指教! 谢谢,Octavia

尝试以下

$(document).ready(function() 
showPopup(); // show pop up when page loads
});


$(window).load(function () {
  hidePopup() // hide popup when page loads completely
});

您可以刷新页面的标题部分,然后进行计算。 还可以将警报放在任何脚本标签上,并且在页面准备就绪时不要加载警报。 这是一个主意:

<script>
   alert ("it will take 5 minutes");
</script>
<%
 // force to send what have, and that way is run the alert.
 Response.Flush(); 
 // now make the long running call
 Calculations();
 %>
...rest of html code that show the results...

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM