Rank: Advanced Member Groups: Member
Joined: 10/31/2007 Posts: 51
|
Hi,
I have 2 callbackpanels and both run scripts client side using ClientSideBeforeExecute.
The first callbackpanel "cbpDealCommands" is not firing the client side script, however it does work if I swap the script fired to UnderConstruction.
As you can see I've even added a debug alert statment to check it's triggered.
Any ideas?
CallbackPanels
1) <eo:CallbackPanel runat="server" ID="cbpDealCommands" OnExecute="cbpCommands_Execute" Triggers="{ControlID:lnkCloseTerritory;Parameter:lnkCloseTerritory},{ControlID:lnkDeleteDeal;Parameter:lnkDeleteDeal}" GroupName="Territories" Width="100%" ClientSideBeforeExecute="ConfirmDelete"> <asp:LinkButton ID="lnkCloseTerritory" runat="server" >Close Territory</asp:LinkButton> <asp:LinkButton ID="lnkDeleteDeal" runat="server">Delete Deal</asp:LinkButton></eo:CallbackPanel>
2)
<eo:CallbackPanel runat="server" ID="cbpNewAgency" GroupName="Agency" OnExecute="cbpNewAgency_Execute" Triggers="{ControlID:imgAddNewAgency;Parameter:imgAddNewAgency}" ClientSideBeforeExecute="UnderConstruction" > <asp:ImageButton ID="imgAddNewAgency" runat="server" ImageUrl="~/Images/Informs/add.GIF" ToolTip="Add New Agency"/> </eo:CallbackPanel>
Scripts <script language="JavaScript">
function UnderConstruction(callbackPanel) { alert("This process is under contruction" ); return false; }
function ConfirmDelete(callbackPanel) { alert("DEBUG: calling confirm delete"); var trigger = callbackPanel.getParam();
if (trigger == "lnkDeleteDeal") { return confirm("Are you sure? This will remove all child sections of this Deal"); } return true; }
</script>
|
Rank: Advanced Member Groups: Member
Joined: 10/31/2007 Posts: 51
|
Sorted.
I changed ConfirmDelete to VerifyDelete.
|