簡體   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