Discussion:
modal popup is not working with Update panel
azy
2009-11-13 07:28:23 UTC
Permalink
Hi ,

I am using jquery plugin for modal popup.in my page i am
using update panel for opening the search window , this is the
content page i used master page also.

while clicking search button,it will trigger the updatepanel search
window. i want this window should open like modal popup, so i used
jquery plugin for doing this, but its not working properly

please send reply soon

Thanks in advance.

Regards,
Azeez.
azy
2009-11-13 07:32:09 UTC
Permalink
Hi

This is my aspx page


<%@ Page Language="C#" MasterPageFile="~/C2SFAMaster.master"
AutoEventWireup="true" CodeFile="Sales_List.aspx.cs"
Inherits="Sales_List" Title="Primary Sales" %>

<%@ Register Assembly="AjaxControlToolkit"
Namespace="AjaxControlToolkit" TagPrefix="cc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1"
Runat="Server">

<script type="text/javascript">

function pop()
{
$.blockUI({ message: "<h1>Remote call in progress...</h1>" });
}
$(document).ready(function() {
$("[id$='btn_search']").click(function() {
document.getElementById("srdiv").style.display == '' ;
$.blockUI({ message: $('#srdiv') });
});


$('#btn_srclose').click(function() {
alert('close');
$.unblockUI();
});
});

</script>


<asp:Button id="btn_search" onclick="btn_search_Click" runat="server"
CssClass="Button" Text="Search" ></asp:Button>

<asp:UpdatePanel id="srpnl" runat="server"
UpdateMode="Conditional">
<contenttemplate>

<div id="srdiv" style="LEFT: 10%; POSITION: absolute; TOP: 72%;width:
810px;height:400px;display :none ; " >

<TABLE id="searchtable" runat="server" cellSpacing=0 cellPadding=0
border=0 ><TBODY>
<TR class="TableHDColor" align=center><TD class="TableHDColor"
colSpan=4>Search</TD></TR>
<TR><TD style="HEIGHT: 26px" class="CellColor3"><asp:TextBox
id="sr_docno" runat="server" Width="60px" SkinID="Textboxs"></
asp:TextBox>
<asp:TextBox id="sr_year" runat="server" Width="60px"
__designer:wfdid="w97" SkinID="Textboxs"></asp:TextBox>

<asp:TextBox id="sr_invoice" runat="server" Width="100px"
__designer:wfdid="w102" SkinID="Textboxs"></asp:TextBox>
</TD></TR>

<TR><TD class="TableBgColor" align=center><TABLE style="WIDTH: 1px"
cellPadding=0 border=0><TBODY><TR><TD style="WIDTH: 100px"><asp:Button
id="btn_srview" onclick="btn_srview_Click" runat="server"
CssClass="button" Text="GO>>" __designer:wfdid="w103"
onClientClick="return srvalid();"></asp:Button></TD><TD style="WIDTH:
100px"><asp:Button id="btn_srclose" onclick="btn_srclose_Click"
runat="server" CssClass="button" Text="Close"
__designer:wfdid="w104"></asp:Button></TD></TR></TBODY></TABLE></TD></
TR>
<TR><TD><asp:DataList id="SrList" runat="server" Width="806px"
OnSelectedIndexChanged="SrList_SelectedIndexChanged"
SkinID="DataLists1"><HeaderTemplate>
<asp:Label id="Label1" runat="server" Width="75px" Text="Doc No"
__designer:wfdid="w82"></asp:Label> <asp:Label id="Label2"
runat="server" Width="60px" Text="Year" __designer:wfdid="w83"></
asp:Label> </HeaderTemplate>
<ItemTemplate>
<asp:RadioButton id="srselect" onclick=pop(); runat="server"
AutoPostBack="True" OnCheckedChanged="SrList_SelectedIndexChanged"></
asp:RadioButton> <asp:Label id="lbl_srno" runat="server" Width="60px"
__designer:wfdid="w142" Text='<%# Eval("SRNO") %>'></asp:Label>
<asp:Label id="lbl_year" runat="server" Width="60px"
__designer:wfdid="w143" Text='<%# Eval("SYEAR") %>'></asp:Label> </
ItemTemplate>
</asp:DataList>
</TD></TR></TBODY></TABLE>
</div>

</contenttemplate>
<triggers>
<asp:AsyncPostBackTrigger ControlID="btn_search" EventName="Click"></
asp:AsyncPostBackTrigger>
<asp:AsyncPostBackTrigger ControlID="btn_srview" EventName="Click"></
asp:AsyncPostBackTrigger>
<asp:AsyncPostBackTrigger ControlID="btn_srclose" EventName="Click"></
asp:AsyncPostBackTrigger>

</triggers>

</asp:UpdatePanel>

</asp:Content>

Loading...