Welcome Guest Search | Active Topics | Sign In | Register

ClientSideBeforeExecute event not firing Options
PThompson
Posted: Tuesday, December 18, 2007 8:31:17 AM
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>&nbsp;
<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>
PThompson
Posted: Tuesday, December 18, 2007 8:46:51 AM
Rank: Advanced Member
Groups: Member

Joined: 10/31/2007
Posts: 51
Sorted.

I changed ConfirmDelete to VerifyDelete.




You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.