Hi all,

My web page contain a datalist. I would like to add a animation extender to allow my datalist item display details.

How can I Identify my clientID of linkbutton in datalist ?

Thus I can use the ClientID to run the javascript.

javascript Code:
  1. <script type="text/javascript" language="javascript">
  2.             // Move an element directly on top of another element (and optionally
  3.             // make it the same size)
  4.             function Cover(bottom, top, ignoreSize) {
  5.                 var location = Sys.UI.DomElement.getLocation(bottom);
  6.                 top.style.position = 'absolute';
  7.                 top.style.top = location.y + 'px';
  8.                 top.style.left = location.x + 'px';
  9.                 if (!ignoreSize) {
  10.                     top.style.height = bottom.offsetHeight + 'px';
  11.                     top.style.width = bottom.offsetWidth + 'px';
  12.                 }
  13.             }
  14.         </script>

php Code:
  1. <ajaxToolkit:AnimationExtender id="OpenAnimation" runat="server" TargetControlID="btnInfo">
  2.             <Animations>
  3.                 <OnClick>
  4.                     <Sequence>
  5.                         <%-- Disable the button so it can't be clicked again --%>
  6.                         <EnableAction Enabled="false" />
  7.                        
  8.                         <%-- Position the wire frame on top of the button and show it --%>
  9.                         <ScriptAction Script="Cover($get('ctl00_SampleContent_btnInfo'), $get('flyout'));" />
  10.                         <StyleAction AnimationTarget="flyout" Attribute="display" Value="block"/>
  11.                        
  12.                         <%-- Move the wire frame from the button's bounds to the info panel's bounds --%>
  13.                         <Parallel AnimationTarget="flyout" Duration=".3" Fps="25">
  14.                             <Move Horizontal="150" Vertical="-50" />
  15.                             <Resize Width="260" Height="280" />
  16.                             <Color PropertyKey="backgroundColor" StartValue="#AAAAAA" EndValue="#FFFFFF" />
  17.                         </Parallel>
  18.                        
  19.                         <%-- Move the info panel on top of the wire frame, fade it in, and hide the frame --%>
  20.                         <ScriptAction Script="Cover($get('flyout'), $get('info'), true);" />
  21.                         <StyleAction AnimationTarget="info" Attribute="display" Value="block"/>
  22.                         <FadeIn AnimationTarget="info" Duration=".2"/>
  23.                         <StyleAction AnimationTarget="flyout" Attribute="display" Value="none"/>
  24.                        
  25.                         <%-- Flash the text/border red and fade in the "close" button --%>
  26.                         <Parallel AnimationTarget="info" Duration=".5">
  27.                             <Color PropertyKey="color" StartValue="#666666" EndValue="#FF0000" />
  28.                             <Color PropertyKey="borderColor" StartValue="#666666" EndValue="#FF0000" />
  29.                         </Parallel>
  30.                         <Parallel AnimationTarget="info" Duration=".5">
  31.                             <Color PropertyKey="color" StartValue="#FF0000" EndValue="#666666" />
  32.                             <Color PropertyKey="borderColor" StartValue="#FF0000" EndValue="#666666" />
  33.                             <FadeIn AnimationTarget="btnCloseParent" MaximumOpacity=".9" />
  34.                         </Parallel>
  35.                     </Sequence>
  36.                 </OnClick>
  37.             </Animations>
  38.         </ajaxToolkit:AnimationExtender>
  39.         <ajaxToolkit:AnimationExtender id="CloseAnimation" runat="server" TargetControlID="btnClose">
  40.             <Animations>
  41.                 <OnClick>
  42.                     <Sequence AnimationTarget="info">
  43.                         <%--  Shrink the info panel out of view --%>
  44.                         <StyleAction Attribute="overflow" Value="hidden"/>
  45.                         <Parallel Duration=".3" Fps="15">
  46.                             <Scale ScaleFactor="0.05" Center="true" ScaleFont="true" FontUnit="px" />
  47.                             <FadeOut />
  48.                         </Parallel>
  49.                        
  50.                         <%--  Reset the sample so it can be played again --%>
  51.                         <StyleAction Attribute="display" Value="none"/>
  52.                         <StyleAction Attribute="width" Value="250px"/>
  53.                         <StyleAction Attribute="height" Value=""/>
  54.                         <StyleAction Attribute="fontSize" Value="12px"/>
  55.                         <OpacityAction AnimationTarget="btnCloseParent" Opacity="0" />
  56.                        
  57.                         <%--  Enable the button so it can be played again --%>
  58.                         <EnableAction AnimationTarget="btnInfo" Enabled="true" />
  59.                     </Sequence>
  60.                 </OnClick>
  61.                 <OnMouseOver>
  62.                     <Color Duration=".2" PropertyKey="color" StartValue="#FFFFFF" EndValue="#FF0000" />
  63.                 </OnMouseOver>
  64.                 <OnMouseOut>
  65.                     <Color Duration=".2" PropertyKey="color" StartValue="#FF0000" EndValue="#FFFFFF" />
  66.                 </OnMouseOut>
  67.              </Animations>
  68.         </ajaxToolkit:AnimationExtender>
  69.  
  70.  
  71.  
  72. <asp:linkbutton ID="lnkBtnColHelp" Text="View Details" CommandName="Vdetail"  style="color:darkred;font:8pt tahoma" runat="server" OnClientClick="return false;"/>

The above is some of my code.

Hope someone can help me :-)