0

This is the javascript I am using to get the fading effect for the modal... It isn't working. I dont know why. It just pops up like in a flash. I want it to fade in slowly & then fade out when closed.

     <link href="Styles/myStyleSheet.css" rel="stylesheet" type="text/css" />
 <link rel="stylesheet" href="http://code.jquery.com/ui/1.10.2/themes/smoothness/jquery-ui.css" />
 <link href="Styles/Tab.css" rel="stylesheet" type="text/css" />

 <script type="text/javascript" language="javascript" src="http://code.jquery.com/jquery-1.9.1.js"></script>
 <script type="text/javascript" language="javascript" src="http://code.jquery.com/ui/1.10.2/jquery-ui.js"></script>

var launch = false;
function launchModalV2() {
    launch = true;
}

function pageLoad() {
    if (launch) {
        //alert('1');
        // $find("mpeTest").show();
        $find('mpeTest').fadeIn();
    }
}

function launchModalV1() {
    alert('1');
    //$find('mpeTest').show();
    $find('mpeTest').fadeIn();
    return false;
}

CSS Class:

.modalBackground
{
background-color: Black;
-filter: alpha(opacity=80);
-opacity: 0.6;
z-index: 10000;
}


<div style="position:absolute">
<act:ModalPopupExtender ID="mpeTest" BehaviorID="mpeTest" runat="server" TargetControlID="btnShowModal" PopupControlID="pnlPopup" OkControlID="btnOk" BackgroundCssClass="modalBackground">
</act:ModalPopupExtender>  
<asp:Button ID="btnOk" runat="server" Text="Ok" />
</div>

 <div>
    <asp:UpdatePanel runat="server" ID="pnlPopup">
    <ContentTemplate>
    <asp:Panel ID="pnlMyAddressBook" runat="server" BackColor="White" CssClass="roundcorner pnl">

    <table style="width:100%" cellspacing="0px" cellpadding="0px">..........
who-aditya-nawandar
  • 1,334
  • 9
  • 39
  • 89
  • It would help to see what HTML has been generated by the `ModalPopupExtender`, also what JS library are you using? – plalx Apr 08 '13 at 06:11

1 Answers1

0

You can try using $("#mpeTest").modal("show") despite using $find('mpeTest').fadeIn();

Ali Shah Ahmed
  • 3,263
  • 3
  • 24
  • 22