안녕하세요 간단한 페이지를 SharePoint 페이지 라이브러리에 업로드하고 긴 대기 대화 상자없이 장기 실행 작업을 시뮬레이션하려고합니다. 다음은 내가 가지고있는 스크립트입니다Sharepoint2013 모달 대화 상자가로드되지 않습니다.
<script type="text/javascript">
var waitDialog = null;
function DoWork() {
toggleProcessingStatus(true);
UpdateUI();
toggleProcessingStatus(false);
}
function UpdateUI()
{
var lblControl = document.getElementById("lbl");
for (i = 0; i < 20000; i++)
{
lblControl.innerText = lblControl.innerText + i;
}
}
function toggleProcessingStatus(showStatus) {
if (showStatus) {
ExecuteOrDelayUntilScriptLoaded(ShowWaitDialog, "sp.js");
}
else {
if (waitDialog != null) {
//setTimeout(CloseWaitDialog, 5000);
CloseWaitDialog();
}
}
}
function ShowWaitDialog() {
waitDialog = SP.UI.ModalDialog.showWaitScreenWithNoClose('Updating...', 'Please wait while update completes...', 150, 330);
}
function CloseWaitDialog() {
if (waitDialog != null) {
waitDialog.close();
}
}
</script>
<input type="button" id="btnShowDialog" title="Do Long Running Work" name="Do Long Running Work" onclick="javascript: DoWork();" value="Do Long Running Work"/>
Label: <label id="lbl" title="Test">Test Wait Screen</label>
모든 도움을 주실 수 있습니다.
감사합니다, Mallikarjun