how to close/hide the popup onmouseout event
-
Hi all, I have created helptooltip usercontrol and using it on my other controls and pages. aspx is
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="HelpTooltipButton.ascx.cs" Inherits="Controls.HelpTooltipButton" %>
<asp:ImageButton ID="TooltipButton" runat="server" Height="19px" Width="19px" ImageUrl="~/Images/HelpIcon_sm.gif" />the code behind is :
protected override void OnPreRender(EventArgs e) { this.TooltipButton.TabIndex = 1000; functionScript = new System.Text.StringBuilder("showPopup('" + Content + "','" + Title + "','" + TooltipButton.ClientID + "');return false;"); TooltipButton.OnClientClick = functionScript.ToString(); TooltipButton.CausesValidation = ButtonValidator; }
This control is being used in other user controls. In my main aspx page, I have used multiview control, to use for tabstrip. when I am on one tab, and if help button is clicked, helptooltip opens. without closing that tooltip if I move to other tab, the tooltip is still open. I would like to close that popup when I move from one tab to other. I tried to use mouseover and mouseout events for the tooltip as:
protected override void OnPreRender(EventArgs e)
{
if ((TEAMAppConstants.m_AppMode == TEAMAppConstants.AppMode.AdminPages) && (TEAMAppConstants.SelectedUseCase == TEAMAppConstants.DASHBOARD_STATUS))
{
return;
}
this.TooltipButton.TabIndex = 1000;
functionScript = new System.Text.StringBuilder("showPopup('" + Content + "','" + Title + "','" + TooltipButton.ClientID + "');return false;");
// TooltipButton.OnClientClick = functionScript.ToString();
TooltipButton.Attributes.Add("onmouseover", functionScript.ToString());
TooltipButton.Attributes.Add("onmouseout", "hidePopup('" + TooltipButton.ClientID.ToString() + "');");
TooltipButton.CausesValidation = ButtonValidator;
}here, onmouseover tooltip opens, but on mouseout I javascript exception as object not found. can anyone please suggest me, how can I handle onmouseout event to close the already opened tooltip help? Many thanks.