Hi mathmax,
Yeah , you can do that .
You can have a generic animation behavior that will be triggered by multiple controls .
1) assign a BehaviourID to your AnimationExtender , assume AnimationExtenderBehaviour1.
2) Use the "set_animationTarget" method of the Behaviour to change the Target Element of the Animation
3) Try the Following JavaScript
<
scriptlanguage="javascript">function ChangeAnimationTarget(){var animator = $find("AnimationExtenderBehaviour1");///ID of a Sys.UI.DomElement or Sys.UI.Control to use as the target of the animation
animator.set_animationTarget(<ID>);
}
</script>
Lemme know if this resolves the issue , if it does dont forget to mark it as an answer.
Try the following links .
Animation Control , Adding Cool Animations in your application
Assigning Animations to Client-Side Controls
Animating Multiple Controls on an Event using Microsoft Ajax AnimationExtender Controls
Lemme know if you are looking for anything specific.
Thanks,
Phanatic
Ok thank you. This solves my problem.
Hi mathmax,
great to hear that.
Can you please go ahead and mark my reply as an answer ?
I'm trying to follow this example in my code. When the page runs, I get a javascript error stating "null" is null or not an object. It happens on this line:
var animator = $find('TestBehaviorID');
This corresponds to the BehaviorID as listed in the following extender tag:
<
ajaxToolkit:AnimationExtenderrunat="server"ID="OpenAnimation"BehaviorID="TestBehaviorID"TargetControlID="btnInfo"><Animations> etc...Any ideas why it can't find this? Thanks.
No comments:
Post a Comment