Quantcast
Channel: ASP.NET AJAX + Ajax Control Toolkit (ACT)
Viewing all articles
Browse latest Browse all 5678

UpdatePanelAnimationExtender - how do I trigger than animation from C# (or JavaScript if need be) ?

$
0
0

I need the animation to run, depending on other conditions not relevent here, without physically pressing the CallButton (which does make the animation run). I've tried hitting the other buttons (TriggerButton) .Click event in javascript, but that doesn't do anything. I've Googled this to death, but I can't find a solution that works.

This is my code:

<asp:Button ID="CallButton" runat="server" Height="38" onclick="MakeCall_Click" Text="Make Call" Font-Bold="true" ForeColor=Indigo Font-Size="Medium" Width="125" />
.
.
.<asp:UpdatePanel ID="MessageNotificationLabelPanel" runat="server" ChildrenAsTriggers="true" UpdateMode="Conditional"><ContentTemplate><div id="background" style="text-align: center; vertical-align: middle; line-height: 25px; padding: 10px; height: 25px; color: #efefef;"><asp:Label ID="MessageUpdate" runat="server" Style="padding: 0px; font-weight: bold;" Visible="True" Width="100%"></asp:Label></div></ContentTemplate><Triggers><asp:AsyncPostBackTrigger ControlID="CallButton" EventName="Click" /><asp:AsyncPostBackTrigger ControlID="TriggerButton" EventName="Click" /></Triggers></asp:UpdatePanel><ajaxToolkit:UpdatePanelAnimationExtender ID="UpdatePanelAnimationExtender1" BehaviorID="animation" runat="server" TargetControlID="MessageNotificationLabelPanel" AlwaysFinishOnUpdatingAnimation="true"><Animations><OnUpdating><Sequence><FadeOut Duration="4.5" Fps="24" /><StyleAction AnimationTarget="MessageUpdate" Attribute="visibility" Value="hidden" /></Sequence></OnUpdating><OnUpdated><Parallel duration="0"><ScriptAction Script="onPanelUpdated();" /></Parallel></OnUpdated></Animations></ajaxToolkit:UpdatePanelAnimationExtender></td></tr></table></asp:Panel><div style="display:none"><asp:button id="TriggerButton" runat="server" Visible="false" onclick="TriggerButton_Click" /></div>

Ideally I'd like to make the UpdatePanelAnimationExtender animation run when I want from the C# code-behind, but I'd settle for a JavaScript mechanism that makes it run too...

Thanks in advance,

Barry


Viewing all articles
Browse latest Browse all 5678

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>