This is a migrated thread and some comments may be shown as answers.

Countdown timer in Tooltip

1 Answer 178 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
Thanh Dang
Top achievements
Rank 2
Thanh Dang asked on 31 Jul 2011, 03:24 PM
Hello

I want to place a count down timer by using JavaScript in my tool tip, which is a .ascx.
In normal pages, the script works and the timer shows. But when showing in a tool tip, it doesn't work.

Is it an abnormal behavior?

Looking forward for the answer.

Thanks in advance
Thanh Dang



1 Answer, 1 is accepted

Sort by
0
Svetlina Anati
Telerik team
answered on 03 Aug 2011, 11:51 AM
Hello Thanh,

Would you please provide more details about your configuration - is the user control directly in a separate tooltip or you are loading it on demand with AJAX? If you are using AJAX, please note that in this case the scripts do not get correctly parsed because of the fact that the update panel uses the innerHTML property and you should dynamically evaluate the scripts if you want them to be recognized as such. This is related to the way the MS AJAX Framework works and it is not directly related to the RadControls and RadToolTipManager.

For such cases, we have prepared a blog post which explains this problem and also offers a sample solution. The blog post has also an attached demo which reproduces the problem without usage of any RadControls and also has the suggested workaround implemented. I believe that this post will be helpful - you can find it below:

http://blogs.telerik.com/tervelpeykov/posts/08-10-20/ajax_using_ajax_to_load_a_usercontrol_that_has_javascript_declared_in_it.aspx

The solution in the blogpost is pretty complex and it does not work in some particular cases. Another solution is to register your scripts from the user control's code-behind as explained below:

http://blogs.telerik.com/blogs/posts/09-05-05/executing_javascript_function_from_server-side_code.aspx

Please, examine the provided resources, find the better solution for your case and let us know how it goes.

 

Kind regards,
Svetlina
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Tags
ToolTip
Asked by
Thanh Dang
Top achievements
Rank 2
Answers by
Svetlina Anati
Telerik team
Share this question
or