PC Review


Reply
Thread Tools Rate Thread

AJAX AnimationExtender

 
 
vcuankitdotnet
Guest
Posts: n/a
 
      22nd Feb 2008
Hi. I have been trying to get the AnimationExtender to work and resize
my div onclick of a button. I am using ASP.NET 2.0. Here is my code
which is used inside a masterpage:

<%@ Register Assembly="AjaxControlToolkit"
Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>
<%@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0,
Culture=neutral, PublicKeyToken=31bf3856ad364e35"
Namespace="System.Web.UI" TagPrefix="asp" %>

<script language="javascript" type="text/javascript">
function CreateInstanceAndPlayAnimation()
{
var changeColorAnimation =
AjaxControlToolkit.Animation.ResizeAnimation($get('changingInfoDiv'),
0.2 , 45 , 200 , 100 , "px");
changeColorAnimation.play();
}
</script>

<div runat="server" id="changingInfoDiv" style="width:50px; height:
150px; background-color:#000000;">
hello, this is my div
</div>
<input type="button" value="Create Instance And Play"
onclick="CreateInstanceAndPlayAnimation();" />
<asp:ScriptManager runat="server" id="scriptmanager1"></
asp:ScriptManager>

<ajaxToolkit:AnimationExtender ID="AnimationExtender1" runat="server"
TargetControlID="changingInfoDiv"
BehaviorID="ChangingInfoDivBehavior">
<Animations>
<OnClick>
<Resize height="100" width="200" duration ="0.2"
fps="45" unit="px"></Resize>
</OnClick>
</Animations>
</ajaxToolkit:AnimationExtender>


I am getting the following javascript error message when clicking the
button:
Error: Sys.ArgumentTypeException: Object of type 'Object' cannot be
converted to type 'AjaxControlToolkit.Animation.ResizeAnimation'.
Paramter name: instance



Any help would be greatly appreciated. Thanks!
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Using ajaxToolkit:AnimationExtender in a content page Cal Who Microsoft ASP .NET 1 16th Dec 2009 06:20 PM
AnimationExtender dynamic TargetControlID from GridView natanr100@gmail.com Microsoft ASP .NET 0 29th Dec 2008 12:24 PM
AnimationExtender in UpdatePanel imbirek8 Microsoft C# .NET 0 10th Nov 2008 11:59 PM
AnimationExtender in Repeater Ve Microsoft C# .NET 0 26th Jan 2008 03:40 PM
Ajax AnimationExtender Bjorn Sagbakken Microsoft ASP .NET 0 4th Nov 2007 03:25 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:58 AM.