Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8357553
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T10:31:02+00:00 2026-06-09T10:31:02+00:00

I am trying to create a popup login screen. It should appear when the

  • 0

I am trying to create a popup login screen. It should appear when the user hovers over a hyperlink and dissapear if the mouse moves out of the popup.
The code I have below works but unfortunately the popup incorrectly closes if the mouse moves over another element inside the popup such as the username and password textboxes.
Any ideas how I can fix this flaw?

<script type="text/javascript" language="javascript">

        function showDiv(display) {
            if (display) { document.getElementById('hoverLoginBox').style.display = 'block'; }
            else { document.getElementById('hoverLoginBox').style.display = 'none'; }
        }
</script>

<asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="~/register.aspx" CssClass="hyperlink"
        onmouseover="showDiv(true);">login</asp:HyperLink>
<div id="hoverLoginBox" onmouseout="showDiv(false);">
        <asp:Login ID="Login3" runat="server" CssClass="loginBox" CreateUserText="Create a new  Client Account"
            CreateUserUrl="~/contact-us.aspx" PasswordRecoveryText="Forgotten Your Password?"
            TitleText="" PasswordRecoveryUrl="~/password-recovery.aspx" LoginButtonType="Image"
            FailureText="Invalid Username / Password." DestinationPageUrl="~/membership/user-profile.aspx"
            FailureAction="RedirectToLoginPage">
            <LayoutTemplate>
                <asp:TextBox ID="UserName" runat="server" CssClass="textbox">username</asp:TextBox>
                <asp:TextBox ID="Password" runat="server" CssClass="textbox">password</asp:TextBox>                  
                <asp:Button ID="Button1" runat="server" CssClass="hoverLoginButton" Text="Login" />
            </LayoutTemplate>
        </asp:Login>
        <div class="loginLinks">
            <asp:HyperLink ID="CreateUserLink" runat="server" NavigateUrl="~/register.aspx" CssClass="hyperlink">Create Account</asp:HyperLink>&nbsp;&nbsp;|&nbsp;&nbsp;
            <asp:HyperLink ID="PasswordRecoveryLink" runat="server" NavigateUrl="~/password-recovery.aspx"
                CssClass="hyperlink">Forgotten Your Password?</asp:HyperLink>
   </div>
</div>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T10:31:04+00:00Added an answer on June 9, 2026 at 10:31 am

    I solved the problem without any code using CSS:

    ASPX:

       <div id="divSideMenu">
            <ul>
                <li><a class="home" href="home.aspx" onmouseover="return show_contact_details()"></a>
                </li>                
                <li>
                    <div id="hoverLoginContainer">
                        <a href="login.aspx" class="lock"></a>
                        <div id="hoverLoginBox">
                            <asp:Login ID="Login3" runat="server" CssClass="loginBox" CreateUserText="Create a new  Client Account"
                                CreateUserUrl="~/contact-us.aspx" PasswordRecoveryText="Forgotten Your Password?"
                                TitleText="" PasswordRecoveryUrl="~/password-recovery.aspx" LoginButtonType="Image"
                                FailureText="Invalid Username / Password." DestinationPageUrl="~/membership/user-profile.aspx"
                                FailureAction="RedirectToLoginPage">
                                <LayoutTemplate>
                                    <asp:TextBox ID="UserName" runat="server" onblur="WaterMark(this, event);" onfocus="WaterMark(this, event);"
                                        CssClass="textbox">username</asp:TextBox>
                                    <asp:TextBox ID="Password" runat="server" onblur="PasswordWaterMark(this, event);"
                                        onfocus="PasswordWaterMark(this,event);" CssClass="textbox">password</asp:TextBox>
                                    <asp:Button ID="Button1" runat="server" CssClass="hoverLoginButton" Text="Login" />
                                </LayoutTemplate>
                            </asp:Login>
                            <div class="loginLinks">
                                <asp:HyperLink ID="CreateUserLink" runat="server" NavigateUrl="~/register.aspx" CssClass="hyperlink">Create Account</asp:HyperLink>&nbsp;&nbsp;|&nbsp;&nbsp;
                                <asp:HyperLink ID="PasswordRecoveryLink" runat="server" NavigateUrl="~/password-recovery.aspx"
                                    CssClass="hyperlink">Forgotten Your Password?</asp:HyperLink>
                            </div>
                        </div>
                    </div>
                </li>
                <li><a class="phone" href="javascript:$zopim.livechat.window.toggle()"></a></li>
                <li><a class="email" href="#" onclick="return show_contact_form('reseller=1160')"></a></li>
            </ul>
        </div>
    

    CSS:

    #hoverLoginBox 
    {
        display: none;
        border: 1px solid #D5D1CD;
        padding: 20px 30px 20px 30px;
        width: 300px;
        z-index: 1000px;
        top: 180px;  
        border-radius: 5px;
        position: fixed;
        left: 45px; 
    }
    
    #hoverLoginContainer:hover #hoverLoginBox 
    {
        display:  block;
    }​
    
    #hoverLoginBox .loginBox
    {
        width: 100%;
    }   
    
    #hoverLoginBox .textbox
    {
        width: 100%;
        margin-bottom: 10px;
        font-family: Arial, Helvetica, sans-serif;
        color: #554f48;
        fonT-weight: normal;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to create a popup menu, where I can detect the mouse button
I am trying to create an ajax popup calender. So When the user clicks
I am trying to create popup using the jqueryui dialog. I am trying to
I'm trying to create a popup for which I am using jQuery's CSS function.Here's
I am trying to create a popup for a search box and submit the
I am trying to create a custom popup view that can be called from
I'm trying to pre-populate create defect popup and I'm not clear on what key/values
I'm trying to create a wx.Menu that will be shared between a popup (called
I have a simplr svg-graph and I'm trying to create a simple tooltip-popup for
I am trying to create a thread to handle a login function that is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.