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

  • Home
  • SEARCH
  • 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 8598185
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T01:05:40+00:00 2026-06-12T01:05:40+00:00

Possible Duplicate: Yes or No confirm box using jQuery I see a lot of

  • 0

Possible Duplicate:
Yes or No confirm box using jQuery

I see a lot of examples here about replacements for jQuerys standard confirm dialog but don’t understand any of them.

If I want to pop-up a confirm dialog using jQuery or jQueryUI. How can i do it and retrieve what button the user clicked ?

Surely there must be a simple way to set up a confirm dialog like an alert("Something!"); command.

Add two buttons to it and set a call back function on yes or no ?

  • 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-12T01:05:41+00:00Added an answer on June 12, 2026 at 1:05 am

    Try this one

    $('<div></div>').appendTo('body')
      .html('<div><h6>Yes or No?</h6></div>')
      .dialog({
          modal: true, title: 'message', zIndex: 10000, autoOpen: true,
          width: 'auto', resizable: false,
          buttons: {
              Yes: function () {
                  doFunctionForYes();
                  $(this).dialog("close");
              },
              No: function () {
                  doFunctionForNo();
                  $(this).dialog("close");
              }
          },
          close: function (event, ui) {
              $(this).remove();
          }
    });
    

    Fiddle

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

Sidebar

Related Questions

Possible Duplicate: Using Source Control So, although even here on Stack Overflow are literally
Possible Duplicate: How pass variable in jquery easy confirm Pass variable to click function
Possible Duplicate: How do I make a request using HTTP basic authentication with PHP
Possible Duplicate: Parse XML with Namespace using SimpleXML PHP SimpleXML Namespace Problem <?php header(Content-Type:
Possible Duplicate: Benefits of omitting closing body and html tags? If you see google.com
Possible Duplicate: Deflate command line tool Yes, I know I can use PHP itself
Possible Duplicate: Is there a difference between YES/NO,TRUE/FALSE and true/false in objective-c? I have
Possible Duplicate: OpenEdge ABL automatically close a yes/no message after a certon amount of
Possible Duplicate: How to change button text for Yes & No buttons on MessageBox.Show
Possible Duplicate: problem sorting using member function as comparator Is it possible to use

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.