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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T00:01:28+00:00 2026-06-17T00:01:28+00:00

I have a div which has display:none. On button press I want to show

  • 0

I have a div which has display:none. On button press I want to show it using jquery. It is shown but just in a second or two it is automatically hidden.

I am not an expert and not able to get where I am doing wrong. Please help me.

  <asp:Button runat="server" ID="btnCVUpload" Text="Upload" OnClientClick="CVConfirm()" />  <div id="divConfirmCV" style="border: dashed 2px black; background: gray; display:none;">
                A profile can have only one CV, uploading this CV will remove an existing CV. Click
                "Yes" to proceed
                <asp:Button runat="server" ID="btnCVYes" Text="Yes" />
                <asp:Button runat="server" ID="btnCVNo" OnClientClick="HideCVConfirm" Text="NO" />
            </div>




 function CVConfirm() {
            $("#divConfirmCV").css("display","block").show(1000)
        }
  • 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-17T00:01:29+00:00Added an answer on June 17, 2026 at 12:01 am

    It’s hidden again because the page is posting back to the server, and you’ve got a brand new page again with the initial state of the button being hidden. You either want to a) not show the div until the page posts back, in which case you could make the div an asp:panel or something similar and set it to Visible on your button click. Or b) you don’t want to use an asp:Button, but a regular <input type=button> which would NOT post back to the server, if you just want to show the div without hitting the server again. I’d say by the look of your code you really want to go with option b. So, your code would simply be:

    <input type=button ID="btnCVUpload" value="Upload" onclick="CVConfirm()" />
    

    Of course, your’re using jquery so you should really do:

    <input type=button ID="btnCVUpload" value="Upload" />
    
    <script>
      $(function(){
        $("#btnCVUpload").click(function(){
           $("#divConfirmCV").css("display","block").show(1000);
        });
      });
    </script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a div which has some text, but according to different situations this
I have a div element which is made jquery Resizable. It has alsoResize option
I want to have the same functionality of select in HTML but using div
I have a div which I set the styling from overflow:auto to display:none depending
I have a DIV tag which I can made either display: none; or visibility:
I have div which has three buttons as, <div id=buttons> <input id=preview class=ButtonStyle type=submit
I have DIV element which only has a few lines in and a background
I have a div (article) which has two childs (header and #content_outer). Header has
I have a menu div which has a dark background. Inside it, I have
I have a div class named switch control which has a div class named

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.