Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

ModalPopupExtender :TypeError: Cannot read property 'show' of null

$
0
0

Hello, I'm trying to show a popup ModalPopupExtender  from Javascript when clicks a button

function GetDropDownData() {
   document.getElementById("<%=ModalPopupExtender1.ClientID%>").show(); 
    return false;
}
<cc1:ModalPopupExtender ID="ModalPopupExtender1" BehaviorID="mpe" runat="server" DropShadow="false"
PopupControlID="pnlPopup" TargetControlID="btnCat" BackgroundCssClass="modalBackground" OkControlID="btnOK" ></cc1:ModalPopupExtender><asp:Panel ID="Panel1" runat="server" CssClass="modalPopup" Style="display: none" ><div id="divheader" style="background-color:White;width:100%;"><iframe src="Catalog.aspx" style='height: 400px; width: 400px' scrolling='no' frameborder='0'></iframe><br /><asp:Button ID="btnOK" runat="server" EnableTheming="True" EnableViewState="False" Text="OK" Width="40px" /></div> </asp:Panel>

but it gives me Javascript runtime error

TypeError: Cannot read property 'show' of null

It works on another page but I don't know what is wrong here.

Thank you


Viewing all articles
Browse latest Browse all 5678

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>