How to programmatically show & hide BalloonPopupExtender?

Posted by Danferd on Stack Overflow See other posts from Stack Overflow or by Danferd
Published on 2013-06-26T03:53:43Z Indexed on 2013/06/26 4:21 UTC
Read the original article Hit count: 866

Filed under:
|
|

I have a page that will be having few buttons that will redirect user to certain pages that required them to login before to proceed to the page. I would like to have something like, when user click on the button that required login and if user is not logged in prior to the click, a tooltip will show up beside the 'User ID' textbox to inform user to login in order to proceed. So, I implemented the jQuery Tooltipster in the page to show the tooltip message.

I'm having problem on IE8 in Windows XP where the first click on the button, the tooltip would show up, but the second click it wouldn't then the third click, it shows up again and then the fourth click, it wouldn't! But for IE8 in Windows 7, IE9 & IE10, they have no such problem. Any idea how to fix this?

The 'imgBtnKISS' & 'lnkBtnKISS' buttons are located in a content page but the tooltip and the 'User ID' textbox are in a master page.

Below is the code that how I call the tooltip:

function loginAlertMsg() {

        $('.tooltip').tooltipster({
            trigger: 'custom',
            position: 'left',
            onlyOne: false,
            content: 'Login required! Please login to proceed.'
        });

        $('#ctl00_txtID').tooltipster('show');
        $('#ctl00_txtID').focus();
    }

Private Sub KISS_Click() Handles imgBtnKISS.Click, lnkBtnKISS.Click
    If Not bIsRefresh Then
        '==Detect User Login Status==
        Session(sesClickFromIcon) = toKISS

        If Session(USR.sesLogin) Is Nothing Then
            '//User NOT LOGIN.
            If (Not Page.ClientScript.IsStartupScriptRegistered("loginAlertMsg")) Then
                Page.ClientScript.RegisterStartupScript(Me.GetType(), "loginAlertMsg", "loginAlertMsg();", True)
            End If

            Exit Sub
        Else
            If Trim(CType(Session.Item(USR.sesLogin), Boolean)) <> True Then
                '//User NOT LOGIN.
                If (Not Page.ClientScript.IsStartupScriptRegistered("loginAlertMsg")) Then
                    Page.ClientScript.RegisterStartupScript(Me.GetType(), "loginAlertMsg", "loginAlertMsg();", True)
                End If

                Exit Sub
            End If
        End If
        '**Detect User Login Status**

        Response.Redirect("~/page2.aspx", False)

        Session.Remove(sesClickFromIcon)
    End If

End Sub

© Stack Overflow or respective owner

Related posts about jQuery

Related posts about ASP.NET