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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T21:48:30+00:00 2026-06-09T21:48:30+00:00

I have a delete and update button that launches a popup. In the popup

  • 0

I have a delete and update button that launches a popup. In the popup I have a label that says Are you sure you want to ” ” I want to use to text from the button the user push and place it into that ” ” area.

ie if they push update, label would say “are you sure you want to update?” and vice versa for delete.

To my knowledge, I can not hide two labels and only use one when one button is clicked because it is position in a div that is running a javascript .show / .hide event. Thus anything that is hidden in that div would automatically appear on that command.

Any suggestions on making a dynamic label that retrieves the text of a button?

javascript

function popup() {
    $("#popupbg").animate({ opacity: ".8" });
    $("#delete").click(function() {
        $("#popupbg, #popupbgitembg").show('fast')
    });
}

function popupcancel() {
    $("#popupbg, #popupbgitembg").hide('medium');
}

function popupdel() {
    var button = document.getElementById("<%= execdelete.ClientID %>");
    button.click();

    $("#popupbg, #popupbgitembg").hide('medium');
}

html

<div id="popupbg"> 
</div> 
<div id="popupbgitembg">
<ul class="popupbgitems">
        <li>
            Are you sure you want to delete?
        </li> 
        <li></li> 
        <li>
            <asp:Button ID="execdelete" runat="server" CssClass="invisible" OnClick="delSysGLDepts" />
            <asp:Button ID="butdelete" runat="server" Text="Delete" OnClientClick="javascript:scroll;popupdel();" Font-Size="11px"/>
            <asp:Button ID="butcancel" runat="server" Text="Cancel" OnClientClick="javascript:popupcancel();" Font-Size="11px"/>

        </li>
    </ul>
</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-09T21:48:32+00:00Added an answer on June 9, 2026 at 9:48 pm

    Because you haven’t shown any sample code I can only discuss in theory, but yes there is no reason you can’t accomplish this.

    I’m assuming you are using javascript confirm to show the alert? If so you can get the text of the button either clientside through javascript or serverside through your code-behind (again I don’t know if your button is client or serverside because you don’t have any sample code). Take that text and pass as part of the text in your confirm call. That should do it.

    If you post some actual code it would be easier to be more specific, but the above concept should work just fine.

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

Sidebar

Related Questions

I have a trigger for insert/update/delete. That is working fine. Also, I need the
I want to have an 'updateinfo' table in order to record every update/insert/delete operations
i have problem use link_to_remote link_to_remote document example say link_to_remote Delete this post, :update
I have a razor view that I added a delete button to inside of
I have richfaces page thru which i have to add/update/delete a user details. My
I have a Word document that contains a command button named update. How can
I have 3 buttons in my html page, say ADD , UPDATE & DELETE
I have a stored procedure which is called inside a trigger on Insert/Update/Delete. The
I need to insert, delete and update data using a xml file. I have
I have a UI with Create , Update , Delete and Select Operations ,

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.