Click here to Skip to main content
15,909,898 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
hello all

i am using two ajax animation extender (one for open and one for close)in my web application (asp, C#) to show message box as hint for the guest, it is working properly when i show the message and when i close it without scrolling the page, but the problem happen when i show the message and if i scrolling the page to up or down the message follow me (to up or down) then after the message follow me to up and when i close it, if i open the message again it generates from up (in the same position when i close it in the up) but i want always message open beside the target button even if i scrolling up and down, so how i can solve this?

this is my ajax code:

ASP.NET
<ajaxToolkit:AnimationExtender ID="AnimationExtender1"  runat="server" TargetControlID="lnkShow">
     <Animations>
         <OnClick>
             <Sequence>
                 <EnableAction Enabled="false"></EnableAction>
                 <StyleAction AnimationTarget="pnlInfo1" Attribute="display" Value="block"/>
                 <Parallel AnimationTarget="pnlInfo1" Duration=".2" Fps="25">
                     <Move Horizontal='10' Vertical='10' />
                     <Resize Height="80%" Width="150%" />
                     <FadeIn />
                 </Parallel>
                 <Parallel AnimationTarget="pnlInfo1" Duration=".5">
                       <Color PropertyKey="color" StartValue="#666666" EndValue="#FF0000"/>
                       <Color PropertyKey="borderColor" StartValue="#666666" EndValue="#FF0000" />
                 </Parallel>
                 <EnableAction AnimationTarget="lnkClose" Enabled="true" />
             </Sequence>
         </OnClick>
     </Animations>
 </ajaxToolkit:AnimationExtender>

 <ajaxToolkit:AnimationExtender ID="AnimationExtender2"  runat="server" TargetControlID="lnkClose">
   <Animations>
         <OnClick>
             <Sequence AnimationTarget="pnlInfo1">
                 <EnableAction AnimationTarget="lnkClose" Enabled="false" />
                 <Parallel AnimationTarget="pnlInfo1" Duration=".3" Fps="25">
                     <Move Horizontal="-10" Vertical="-10" />
                     <Scale ScaleFactor="0.05" FontUnit="px" />
                     <FadeOut />
                 </Parallel>
                 <EnableAction AnimationTarget="lnkShow" Enabled="true" />
             </Sequence>
         </OnClick>
     </Animations>
 </ajaxToolkit:AnimationExtender>


thank you
Posted
Comments
armie340 13-Mar-13 0:56am    
you will learn something in this site-->http://spyrestudios.com/jquery-part-two-selectors-animation-and-ajax/
Medo-I 14-Mar-13 4:28am    
thank you

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900