JSFiddle - React, Tailwind, and code Playground
HTML
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/dojo/1.7.2/dojo/resources/dojo.css">
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/dojo/1.7.2/dijit/themes/claro/claro.css">
<html>
<head>
</head>
<body class="claro">
<div id="dialog" data-dojo-type="dijit.Dialog">
<div id="message">This text will be replaced in 2 seconds</div>
</div>
<button data-dojo-type="dijit.form.Button" id="showBtn">Show dialog</button>
</body>
</html>
CSS
#dialog {
width : 300px;
height : 250px;
}
JavaScript
function showMessage(message) {
require(["dojo/dom-attr"], function(domAttr) {
domAttr.set("message", "innerHTML", message);
});
}
require(["dijit/Dialog", "dijit/form/Button", "dojo/parser", "dojo/_base/connect", "dojo/domReady!"], function(Dialog, Button, parser, connect) {
parser.parse();
var showBtn = dijit.byId("showBtn");
var dialog = dijit.byId("dialog");
showBtn.on("click", function(e) {
dialog.show().then(function(response){
setTimeout("showMessage('This is the new text');", 2000);
});
});
});