Hello,
I've created an ASPX page inheriting from Master Page to test a modal tooltip. In the Modality Tooltip demo the browser window is faded out and only the tooltip can be accessed by the user. With my code below however the browser window isn't faded out and the button for example can still be accessed and i get this run time error: "Microsoft JScript runtime error: 'Sys' is undefined"
Do you have any idea about a solution to this ?
Thanks for help!
I've created an ASPX page inheriting from Master Page to test a modal tooltip. In the Modality Tooltip demo the browser window is faded out and only the tooltip can be accessed by the user. With my code below however the browser window isn't faded out and the button for example can still be accessed and i get this run time error: "Microsoft JScript runtime error: 'Sys' is undefined"
Do you have any idea about a solution to this ?
Thanks for help!
<%@ Page Title="" Language="C#" MasterPageFile="~/FunctionalityMasterPage.master"
AutoEventWireup="true" CodeFile="Test_Wait.aspx.cs" Inherits="Test_Wait" %>
<
asp:Content
ID
=
"Content1"
ContentPlaceHolderID
=
"cphHeader"
runat
=
"Server"
>
<
script
type
=
"text/javascript"
>
//
<![CDATA[
var toHide = false;
function OnClientBeforeHide(sender, args) {
if (!toHide) args.set_cancel(true);
}
function OnClientBeforeShow(sender, args) {
sender.set_modal(sender.get_modal());
}
//Attach to event that will indicate when ajax request is complete
Sys.WebForms.PageRequestManager.getInstance().add_beginRequest
(
function (sender, args) {
toHide = false;
if (args.get_postBackElement().id == "Button1") {
var tooltip = $find("<%=RadToolTip1.ClientID%>");
tooltip.show();
}
}
);
function GetActiveToolTip() {
var tooltip = Telerik.Web.UI.RadToolTip.getCurrent();
return tooltip;
}
//Attach to event that will indicate when ajax request is complete
Sys.WebForms.PageRequestManager.getInstance().add_endRequest
(
function (sender, args) {
var tooltip = GetActiveToolTip();
if (tooltip != null && tooltip.get_id() == "RadToolTip1") {
toHide = true;
tooltip.hide();
}
}
);
//]]>
</
script
>
</
asp:Content
>
<
asp:Content
ID
=
"Content2"
ContentPlaceHolderID
=
"cphContent"
runat
=
"Server"
>
<
telerik:RadToolTip
ID
=
"RadToolTip1"
IsClientID
=
"false"
runat
=
"server"
Modal
=
"true"
ShowEvent
=
"FromCode"
Position
=
"Center"
RelativeTo
=
"BrowserWindow"
OnClientBeforeShow
=
"OnClientBeforeShow"
OnClientBeforeHide
=
"OnClientBeforeHide"
Width
=
"140px"
EnableShadow
=
"true"
HideEvent
=
"FromCode"
>
<
img
src
=
'Images/Icons/loading.gif'
alt
=
"loading"
style
=
"margin-left: 35px;"
/>
</
telerik:RadToolTip
>
<
asp:Panel
ID
=
"Panel1"
runat
=
"server"
BorderColor
=
"White"
>
<
table
>
<
tr
>
<
td
style
=
"width: 50px;"
>
</
td
>
<
td
>
<
asp:UpdatePanel
ID
=
"UpdatePanel1"
runat
=
"server"
>
<
ContentTemplate
>
<
asp:ImageButton
ID
=
"Button1"
ImageUrl
=
"Images/Icons/send_sms.png"
runat
=
"server"
OnClick
=
"Button1_Click"
CssClass
=
"button"
Style
=
"display: block; float: left;"
/>
</
ContentTemplate
>
</
asp:UpdatePanel
>
</
td
>
</
tr
>
<
tr
>
<
td
style
=
"width: 50px;"
>
</
td
>
<
td
>
<
asp:Label
ID
=
"Label1"
runat
=
"server"
Text
=
"Label"
></
asp:Label
>
</
td
>
</
tr
>
</
table
>
</
asp:Panel
>
</
asp:Content
>