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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T23:29:56+00:00 2026-06-06T23:29:56+00:00

How to create a confirm dialog box in dojo? I would like to have

  • 0

How to create a confirm dialog box in dojo? I would like to have an ok cancel dialog to appear on button click with dojo dialog (no javascript confirm dialog).
So far i can only display a dialog on click event.
Heres my code:

<script type="text/javascript">
dojo.require("dijit.form.Button");
dojo.require("dijit.Dialog");

var secondDlg;
dojo.ready(function(){
    // create the dialog:
    secondDlg = new dijit.Dialog({
       title: "Programmatic Dialog Creation",
       style: "width: 300px",
   draggable:false
    });
});
showDialogTwo = function(){
   // set the content of the dialog:
   secondDlg.set("content", "Hey, I wasn't there before, I was added at " + new Date() + "!");
   secondDlg.show();
}
</script>
</head>
<body class="claro" style="margin-right:10px;">
<button id="buttonTwo" data-dojo-type="dijit.form.Button" data-dojo-props="onClick:showDialogTwo" type="button">Show me!</button>
</body>

How can i make this ok cancel dialog box?

  • 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-06T23:29:57+00:00Added an answer on June 6, 2026 at 11:29 pm

    The solution above does not take into account the little cross at the top right of the dialog.

    I had done, long ago, a little suite of dialogs, you might find some happiness here, especially ConfirmDialog.js
    I just uploaded them on github today so you can take a look at them : http://github.com/PEM-FR/Dojo-Components/tree/master/dojox/dialog

    They should be usable “as-is” or with minor changes

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

Sidebar

Related Questions

How would I use ColorBox to create a 'confirm override' modal dialog that can
I would like to display a confirm dialog box Are you sure? when user
I can create a confirm box in Ext JS like this: with this code:
I'm trying to create a modal confirmation dialog box. I'd like it to work
I have an @Ajax.ActionLink which for which I would like display a confirmation dialog
I'm trying to create an Aler Dialog but when I click on button my
I have functionality where I dynamically create Dialog. Some time I require Modal or
I have created some code to popup a confirm dialog if a user tries
My ViewState implementation causes Confirm Form Resubmission dialog to appear each time I press
I am using SimpleModal in jQuery, and I have one confirm dialog. If the

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.