Hi,
I have javascript which gets call on client click from modal popup extender. When I click on OK button in confirm dialog box AjaxLoadingPanel animation not spinning.
Here is my javascript:
<telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
<script type="text/javascript">
function DateSelected(sender, eventArgs) {
sender.get_textBox().focus();
}
</script>
<script type="text/javascript">
var currentLoadingPanel = null;
var currentUpdatedControl = null;
function OnClientClick() {
var txttext1 = document.getElementById('<%=txtComments.ClientID%>');
if (txttext1.value != "") {
$find("ModalBehaviour").hide();
currentLoadingPanel = $find("<%= RadAjaxLoadingPanel1.ClientID %>");
currentUpdatedControl = "<%= mainPanel.ClientID %>";
currentLoadingPanel.show(currentUpdatedControl);
return true;
}
else {
if (confirm("Are you sure you want to proceed without comments ?")) {
$find("ModalBehaviour").hide();
currentLoadingPanel = $find("<%= RadAjaxLoadingPanel1.ClientID %>");
currentUpdatedControl = "<%= mainPanel.ClientID %>";
currentLoadingPanel.show(currentUpdatedControl);
return true; }
else {
$find("ModalBehaviour").hide();
return false; }
}
}
</script>
Here is loading Panel:
<telerik:RadScriptManager ID="ScriptManager1" runat="server" />
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="mainPanel">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="mainPanel" LoadingPanelID="RadAjaxLoadingPanel1" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" EnableSkinTransparency ="true" runat="server" Skin="Office2010Blue">
</telerik:RadAjaxLoadingPanel>
This is part of the MainPanel:
<asp:Panel ID="mainPanel" runat="server">
<telerik:RadPanelBar ID="formPanel" runat="server" Width="99%" ExpandMode="MultipleExpandedItems" Skin="Forest" EnableEmbeddedSkins="false" BackColor="#2D6193" >
<Items>
<telerik:RadPanelItem Expanded="true" Text="PRINCIPAL PER SESSION REQUEST APPLICATION FORM " runat="server" Selected="true" Font-Bold="true" Font-Size ="13" Font-Names ="Verdana" ForeColor="white" >
<Items>
<telerik:RadPanelItem Value="principalForm" runat="server" Height="75">
<ItemTemplate>
<table>
<tr>
<asp:Panel ID="validationPanel" runat="server" Visible="false">
<td >
<fieldset style="width: 700px; height: 230px; margin-bottom: 10px;">
<legend style="padding-top:20px;">Please correct the following:</legend>
<asp:ValidationSummary ID="validationSummary1" runat="server" DisplayMode="BulletList" CssClass="validationsummary" />
<asp:CustomValidator ID="customValidator1" runat ="server" Display="none" OnServerValidate="customValidator1_ServerValidate" ></asp:CustomValidator>
</fieldset>
</td>
</asp:Panel>
</tr>
</table>
And finally modal popup extender:
<asp:Button ID="btnShow1" runat="server" Style="display: none; position: relative" Text="Show Modal Popup" />
<cc1:ModalPopupExtender ID="ModalPopupExtender1" runat="server" BackgroundCssClass="modalBackground"
DropShadow="true" PopupControlID="ApprPanel" TargetControlID="btnShow1" BehaviorID="ModalBehaviour"></cc1:ModalPopupExtender>
<asp:Panel ID="ApprPanel" runat="server" BackColor="White" BorderStyle="Solid" BorderWidth="2px"
Height="200px" Style="display: none; color:#b0c4de;" Width="570px" >
<div>
<table>
<tr >
<td style="border-right-style: none; border-left-style: none; border-bottom-style: none;
padding:5px;border-top-color: #abd971; background-color: #284A6D; text-align: center;">
<asp:Label ID="lblError" runat="server" Text="Please Enter Comments(optional)"
Font-Bold="True" Font-Size="Large" ForeColor="White"></asp:Label>
</td>
</tr>
<tr>
<td align="center" style="margin-top: 10px; vertical-align:middle;">
<asp:TextBox ID="txtComments" runat="server" Width="550px" onKeyUp="Count(this,250)" onChange="Count(this,250)"
Height="113px" TextMode="MultiLine"></asp:TextBox>
</td>
</tr>
<tr>
<td align="center" style="height: 39px">
<br />
<asp:Button ID="submitComments" runat="server" Text="Submit" CssClass="button" OnClick="submitComments_Click" OnClientClick="return OnClientClick()" />
</td>
</tr>
</table>
</div>
</asp:Panel>
Please help me to resolve this issue.
Thanks so much.