I'm using this code to show dialog popup.
But after clicking button btnNOvo to open dialog it disapears after two seconds. Why?
<asp:UpdatePanel ID="pnlLeft" runat ="server">
<ContentTemplate>
<div style="width:100%;vertical-align:top;">
<div style ="margin-left:20px;margin-right:20px;">
<GraweControls:graweGrid id ="gvMaterijali" runat="server" />
<asp:Button ID="btnNovo" runat="server" CssClass ="button" Text = "UNOS" OnClientClick ="return openDialog()" OnClick ="btnNovo_Click" />
<asp:Button ID="btnPromjena" runat ="server" CssClass ="button" Text ="PROMJENI" OnClick ="btnPromjena_Click" OnClientClick ="return openDialog()" />
<asp:Button ID="btnBrisi" runat="server" CssClass ="button" Text ="OBRIŠI" OnClick ="btnBrisi_Click" />
<asp:Button ID="btnSlike" runat="server" CssClass ="button" Text ="SLIKE.." OnClick ="btnSlike_Click" />
</div>
</div>
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="gvMaterijali" />
</Triggers>
</asp:UpdatePanel>
<asp:UpdatePanel ID="pnl" runat ="server" >
<ContentTemplate>
<ej:Dialog ID="dialogMaterijal" Title="UNOS / PROMJENA MATERIJALA" ShowOnInit="false" CloseOnEscape ="true" CssClass ="popup" runat="server" Width="750">
<DialogContent>
<div style ="display:inline-block; float:left;width:65%; height:500px;">
ID materijala<br />
<asp:Label ID="lblID" runat="server" /><br /><br />
Grupa materijala<br />
<asp:DropDownList ID="ddlGrupaMaterijala" runat="server"></asp:DropDownList><br /><br />
Materijal<br />
<asp:TextBox ID="txtMaterijal" runat="server" Width="550px"></asp:TextBox><br /><br />
Serijski broj<br />
<asp:TextBox ID="txtSB" runat="server"></asp:TextBox><br /><br />
Jedinična cijena<br />
<asp:TextBox ID="txtCijena" runat="server" Width="70px"></asp:TextBox><br /><br />
Popust<br />
<asp:TextBox ID="txtPopust" runat="server" Width="80px"></asp:TextBox><br /><br />
Stanje zaliha<br />
<asp:TextBox ID="txtZalihe" runat="server" Width="80px"></asp:TextBox><br /><br />
Opis<br />
<asp:TextBox ID="txtOpis" runat="server" Rows ="5" Width ="447px" TextMode="MultiLine"></asp:TextBox><br /><br />
<asp:Button ID="btnSave" runat="server" CssClass ="button" OnClick = "Save" />
</div>
<asp:Image ID="imgMat" runat="server" Height="200" Width="200" CssClass ="imgFilter" />
<ajax:AsyncFileUpload OnClientUploadError="uploadError" CssClass ="FileUploadClass"
OnClientUploadComplete="uploadComplete" runat="server" ID="AsyncFileUpload1" Width="120px" UploaderStyle="Modern"
CompleteBackColor = "White" UploadingBackColor="#CCFFFF" ThrobberID="imgLoader" OnUploadedComplete = "FileUploadComplete"
Font-Size="12" Font-Names="Courier" />
<asp:Image ID="imgLoader" runat="server" ImageUrl = "../Images/loading.gif" />
<asp:Label ID="lblMesg" runat="server" Text="" />
<ej:Tab ID="tab1" runat="server" EnableAnimation="True" HeaderPosition="Top" ShowRoundedCorner="True">
<Items>
<ej:TabItem Text="Slike materijala">
<ContentSection>
<table class="tblMiddle">
<tr>
<td>
<hr style="color: #666666" />
<div id="images" style="height: 300px; width: 200px; overflow: Auto;margin-left:10px;margin-top:0px;">
<asp:DataList ID="DataList1" runat="server" RepeatColumns="8" RepeatDirection="Horizontal"
RepeatLayout="Flow" ShowFooter="false" BorderStyle="Solid" BorderWidth="0.5" GridLines="Horizontal"
OnItemCommand="dlImages_OnItemCommand" BorderColor="#CCCCCC">
<ItemTemplate>
<asp:ImageButton ID="menuBtn" runat="server" CssClass="menuImg" Height="50"
CommandArgument='<%# Eval("Value") %>'
ImageUrl='<%# Eval("Value") %>' Width="70" CommandName="ImageButtonClick" />
</ItemTemplate>
</asp:DataList>
</div>
<hr style="color: #666666" />
</td>
</tr>
</table>
</ContentSection>
</ej:TabItem>
</Items>
</ej:Tab>
</DialogContent>
</ej:Dialog>
</ContentTemplate>
</asp:UpdatePanel>