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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T01:15:35+00:00 2026-05-11T01:15:35+00:00

I am using SimpleModal in jQuery, and I have one confirm dialog. If the

  • 0

I am using SimpleModal in jQuery, and I have one confirm dialog. If the result is Yes, I have to call my.php into this dialog. However, I have done the code, and I am still searching for ideas. How can I do it?

$(document).ready(function () {     $('#confirmDialog input.confirm, #confirmDialog a.confirm').click(function (e) {         e.preventDefault();         // Example of calling the confirm function.         // You must use a callback function to perform the 'yes' action.         confirm('Continue', function () {             alert('OK');         });     }); });  function confirm(message, callback) {     $('#confirm').modal({         close:false,         position: ['20%',],         overlayId:'confirmModalOverlay',         containerId:'confirmModalContainer',         onShow: function (dialog) {             dialog.data.find('.message').append(message);              // If the user clicks 'yes'             dialog.data.find('.yes').click(function () {                 $.get('my.php', function(data){                     // Create a modal dialog with the data.                     // Here: How do I write the same window?                 });                  // Call the callback                  // Close the dialog                 $.modal.close();             });         }     }); } 

Here I have the problem of how to write it the same window Confirmdialog from an Ajax result. How can I do it?

  • 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. 2026-05-11T01:15:35+00:00Added an answer on May 11, 2026 at 1:15 am

    I’m not sure that the confirm function best fits your needs, but something like this should work:

    function confirm(message, callback) {     $('#confirm').modal({         close:false,         position: ['20%',],         overlayId:'confirmModalOverlay',         containerId:'confirmModalContainer',         onShow: function (dialog) {             dialog.data.find('.message').append(message);              // If the user clicks 'yes'             dialog.data.find('.yes').click(function () {                 $.get('my.php', function (data) {                     /* Sample response:                      *   <div id='title'>my title</div>                      *   <div id='message'>my message</div>                      *                      */                     var resp = $('<div/>').append(data);                     var title = resp.find('#title').html(),                         message = resp.find('#message').html();                      dialog.data.find('.header span').html(title);                     dialog.data.find('.message').html(message);                     dialog.data.find('.buttons .yes').hide();                     dialog.data.find('.buttons .no').html('Close');                      // No need to call the callback or $.modal.close()                 });             });         }     }); } 
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 127k
  • Answers 127k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer to set a j2me app to the background use the… May 12, 2026 at 5:33 am
  • Editorial Team
    Editorial Team added an answer Take a look at the System log in Windows EventViewer… May 12, 2026 at 5:33 am
  • Editorial Team
    Editorial Team added an answer I'm not sure what threading library you use, but you… May 12, 2026 at 5:33 am

Related Questions

I'm using jQuery and SimpleModal in an ASP.Net project to make some nice dialogs
I have a page that has two tabs created using jQuery, and I am
I am using the simple modal and Ajax . When I try to read
I've been using Simple Modal and i feel it doesn't live up to what

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.