Hi:
I have a simple example (I used code infront for ease of showing this example and pasting the code).
I have a tool-tip that I am trying to to show via javascript, but I am getting the following error:
Microsoft JScript runtime error: Object doesn't support this property or method
I believe that getElementById ultimately finds the div tag (not the $find), but the show method is not understood.
Phil
I have a simple example (I used code infront for ease of showing this example and pasting the code).
<%@ Page Language="VB" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<
script
runat
=
"server"
>
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
RadScriptManager.RegisterStartupScript(Me, Me.GetType, "openShowRadToolTip1", "ShowMyRadToolTip1();", True)
End Sub
</
script
>
<
html
xmlns
=
"http://www.w3.org/1999/xhtml"
>
<
head
runat
=
"server"
><
title
>Tool tip js test</
title
></
head
>
<
body
>
<
form
id
=
"form1"
runat
=
"server"
>
<
telerik:RadScriptManager
ID
=
"RadScriptManager1"
Runat
=
"server"
>
</
telerik:RadScriptManager
>
<
asp:Button
ID
=
"Button1"
runat
=
"server"
Text
=
"Button"
/>
<
telerik:RadToolTip
ID
=
"RadToolTip1"
runat
=
"server"
IsClientID
=
"true"
>
I am here!
</
telerik:RadToolTip
>
<
script
type
=
"text/javascript"
>
//
<![CDATA[
function ShowMyRadToolTip1() {
var radName = '<%= RadToolTip1.ClientID %>';
var rad_ToolTip = $find(radName);
if (rad_ToolTip == null) {
alert("get element by id of:" + radName);
rad_ToolTip = document.getElementById(radName);
}
rad_ToolTip.show();
};
//]]>
</
script
>
</
form
>
</
body
>
</
html
>
Microsoft JScript runtime error: Object doesn't support this property or method
I believe that getElementById ultimately finds the div tag (not the $find), but the show method is not understood.
Phil