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 9029999
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T07:22:55+00:00 2026-06-16T07:22:55+00:00

I have a login FORM inside a Hidden DIV, this DIV is hidden using

  • 0

I have a login FORM inside a Hidden DIV, this DIV is hidden using CSS display:none; when I click on some other DIV, I show this DIV using jquery .slideDown(), so I can be able to use this form.

When I click on the button, the OnClick="Login" doesn’t seem to work,and when I removed this form from this hidden div to simply another place in the body, it worked. What’s the problem?

ASP.NET:

<div id="userCPContainer">
<form id="loginForm" runat="server">
    <asp:Label ID="Label1" runat="server" Text="Username" class="loginLabels"></asp:Label>
    <br />
    <asp:TextBox ID="usernameField" runat="server" MaxLength="50" class="loginFields"></asp:TextBox>
    <asp:Label ID="Label2" runat="server" Text="Password" class="loginLabels"></asp:Label>
    <br />
    <asp:TextBox ID="passwordField" runat="server" MaxLength="50" 
        TextMode="Password" class="loginFields"></asp:TextBox>


    <asp:Button ID="loginButton" runat="server" Text="Log in" onclick="Loginn" class="loginButton"/>
</form>
</div>

JQUERY:

function showUserCP() {

    $("#userCPContainer").slideDown(200);
    $(".userCPDiv").css("background-color", "#000000");
    $(".userCPDiv").css("border-color", "#000000");
}

function hideUserCP() {
    $(".userCPDiv").css("background-color", "rgb(43, 147, 206)");
    $(".userCPDiv").css("border-color", "rgb(43, 147, 206)");
    $("#userCPContainer").slideUp(200);

}

$(".userCPDiv").click(function (e) {
        //Either way, hide Main Menu
        hideMainMenu();
        if ($("#userCPContainer").is(":visible")) {
            hideUserCP();
        }
        else {
            showUserCP();
        }
        e.stopPropagation();

    });

CSS:

#userCPContainer
{
    overflow:hidden;
    border-style:solid;
    border-top-style:none;
    border-color:rgb(43,147,206);
    border-width:2px;
    position:absolute;
    right:0px;
    top:0px;
    display:none;
    z-index:1;
    width:300px;
    background-color:  #000000;
}

Nothing really complicated…

  • 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-16T07:22:57+00:00Added an answer on June 16, 2026 at 7:22 am

    When you use CSS display: none; the problem is that all that’s inside that DIV gets removed completely from the HTML Document and that causes that ASP.NET does not recognize this element when you show it via jQuery. I see to possible solutions:

    1. Use visibility: hidden instead of display: none;, if you do this you will probably have some problems with the DIV height because it will take the space needed to render but it will not be visible.
    2. Use a ScriptManager and an UpdatePanel and put the div and the form inside those elements, so the server will know when you render the Button in the client. Also, make sure that you register your jQuery scripts inside the ScriptManager

    Hope this helps you

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have implemented a login form using JSF and PrimeFaces. I used this example
I have a login form for my website. This login form have two text
I have this login form. This form is a grouped table view where the
I have written a login form, in this I have used, form and method
I have a link on my page, which calls a login form inside Fancybox.
I have this login form on my program in C#, I will be matching
I Have done a login form validation using jquery, But Thing is error message
Please help. I have page login/auth.gsp with the following code inside the body <div
I currently have a login.html, which has inside it a form for login. All
I have this very simple login form with user and pass and I need

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.