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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T04:06:15+00:00 2026-06-16T04:06:15+00:00

I am trying to hook a jquery style yes|no confirmation box before a button

  • 0

I am trying to hook a jquery style yes|no confirmation box before a button posts back.

What should happen

  • User clicks “no” – no postback
  • User clicks “yes” – postback, button event is triggered

What currently happen

  • User clicks “no” – no postback
  • User clicks “yes” – postback, page load event is triggered, but not
    button event handler

So, how can I get the button event handler to fire? Right monw it just goes to page load event.

 <asp:Button ID="btnSetActive" runat="server" Text="Set as Active" OnClientClick="AllBrandsConfirmation(); return false;" onclick="btnSetActive_Click" />


$(function () {

    // Set all brands (yes button)
    $('#setAllBrandsConfirmation #yes').click(function () {
        $.unblockUI();
        __doPostBack('ctl00_ctl00_oCPH1_Content_btnSetActive', '');
    });

    // Set all brands (no button)
    $('#setAllBrandsConfirmation #no').click(function () {
        $.unblockUI();
    });

});


// All brands confirmation
function AllBrandsConfirmation() {
    $.blockUI({ message: $('#setAllBrandsConfirmation') });
}
  • 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-16T04:06:19+00:00Added an answer on June 16, 2026 at 4:06 am

    I just figured it out… well google helped 🙂 Apparently in the first argument for the doPostBack method you need to use the controls uniqueId, not the id value. Once I changed that it triggered the event.

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

Sidebar

Related Questions

I'm trying to hook up the click event on a jQuery image carousel's images
I am currently trying to hook up jQuery UI dialog so that I may
I am trying to hook into a link in a gridview with jquery but
I am trying to hook up an ICommand on the model to a button
I'm stuck trying to implement a user-configurable filter on a table using jQuery (in
Trying to hook into the function comment_text() supplied by Wordpress API to wrap the
I'm trying to hook the SetCooperativeLevel function in the DirectDraw object. My goal is
I am desperately trying and failing to hook CallWndProc using EasyHook. Intptr addr =
I am trying to add a post-commit hook to a bare repository, such that
I am trying to add a hook in Autotest to trigger tests when javascript

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.