tags:

views:

360

answers:

2

I m using Asp.Net 3.5

I want to display pop-up window center of the screen just 2 seconds. It will appear 2 sec. and automatically disappear.

How can I do this with modal pop-up?

I tried this but not hiding after 2 sec ?

   function showPanel() {
        $find('modal').show();
        setTimeout("hidePanel()",2000);
    }
       function hidePanel() {
       $find('modal').hide();

    }
    </script>
</head>

Sepete Ekle

 <cc1:ModalPopupExtender ID="ModalPopupExtender1" runat="server" TargetControlID="SepeteEkle" PopupControlID="bilgi" DropShadow="true" BehaviorID="modal">

A: 

Using JQuery with UI Dialog Plugin. You can close it after specified time interval. Check JQuery web for more details.

Anuraj
A: 

Assuming you're using ASP.NET AJAX...

Give your ModalPopupExtender a BehaviorID in the ASPX markup, you can then use

$find('behaviorID')

in javascript to get at the Panel.

Then you can have two functions

function showPanel()
{
    $find('behaviorID').show();
    setTimeout("hidePanel()",2000);
}

function hidePanel()
{
    $find('behaviorID').hide();
}
Phil Jenkins
Hi Phil,I couldnt solve that way
Jack
What happens if you use modalPopupBehavior.hide() before modalPopupBehavior.dispose()?
Phil Jenkins
Actually it doesnt hide. I tried with ff and ie. Results is fail. I think tehere is an error at the Hide method ?
Jack