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

.show() is an undefined method

1 Answer 41 Views
ToolTip
This is a migrated thread and some comments may be shown as answers.
Kevin
Top achievements
Rank 1
Kevin asked on 30 Sep 2011, 09:32 PM
I get an error when trying to invoke a tooltip that .show() is an undefined method.  The specific code is:

var tooltip = $find('OrderToolTip');
tooltip.show();

I am not using jQuery in the application, so can I use the client-side tool tip API without it?  I've had a tool tip working on another project in the past, which also didn't use jQuery, but I no longer have the code.

1 Answer, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 03 Oct 2011, 09:49 AM
Hi Kevin,

If the RadToolTip is in an INaming container (such as a master page or an update panel) its ID will be changed by the framework and this is a very likely reason why you cannot access it. In order to get the correct ID you would need to obtain if from the server,for example:
var tooltip = $find('<%=OrderToolTip.ClientID%>');

Another possible reason is that you are trying to get a reference to the JavaScript object before the control is loaded on the page. This happens in the Sys.Application.Load event and this is the earliest point at which you can reference AJAX-enabled controls. A shortcut to this event is the JavaScript pageLoad() function. If you want the tooltip visible when the page is loaded you can use its VisibleOnPageLoad property and set it to true.

As for jQuery - our controls internally use jQuery for some of the functionality and therefore output it to the page if needed. This will not impact your own jQuery if you are using it, neither it is required that you add your own.

Greetings,
Marin
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Tags
ToolTip
Asked by
Kevin
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Share this question
or