• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 852
  • Last Modified:

Modal Popup as updateprogress

Hi

I want to use a Modal Popup as an updatepanel updateprogress. I am using the posted code to/show the modal popup - this works ok.

But this way i loose the "DisplayAfter" property of the ajax updateprogress control.

Is there any other way to do this and still have the "DisplayAfter" functionality?

Thanks
Jacob
<script type="text/javascript">
 
        Sys.Net.WebRequestManager.add_invokingRequest(onInvoke);
        Sys.Net.WebRequestManager.add_completedRequest(onComplete);
 
        function onInvoke(sender, args)
        {
        
            $find('<%= mpeProgress.ClientID %>').show();
        }
 
        function onComplete(sender, args)
        {
            $find('<%= mpeProgress.ClientID %>').hide();
        }
 
</script>

Open in new window

0
agerled
Asked:
agerled
1 Solution
 
wht1986Commented:
Use the window timeout methods:

var timeoutId = null

function onInvoke(sender, args)
{
    timeoutId  = window.setTimeout("ShowIt();", 100);
}

function onComplete(sender, args)
        {
            if (timeoutId  != null)
                  window.clearTimeout(timeoutId );
            $find('<%= mpeProgress.ClientID %>').hide();
            timeoutId  = null;
        }

function ShowIt()
{
            $find('<%= mpeProgress.ClientID %>').show();
}

0
 
agerledAuthor Commented:
Hi.

Thank you very much. That worked.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now