I am trying to display an alert box using Dojo. The alert box behavior will be modeless. All work is done through a Javascript which has functions to addScript/CSS and these functions work fine. Though i am not bale to display alert using Dojo. Here is my code:
//DojoThemes and Libraries
addStylesheet('http://ajax.googleapis.com/ajax/libs/dojo/1.5/dijit/themes/claro/claro.css');
addStylesheet('http://ajax.googleapis.com/ajax/libs/dojo/1.5/dijit/themes/tundra/tundra.css');
addScript('http://ajax.googleapis.com/ajax/libs/dojo/1.5/dojo/dojo.js');
//dojo.require("dojo.ready");
//dojo.require("dijit.Dialog");
var dojoDialogBox = document.createElement('script');
dojoDialogBox.innerHTML = 'require(["dojo/ready", "dijit/Dialog"], function(ready, Dialog){ ready(function(){ myDialog = new Dialog({ title: "My Dialog", content: "Test content.", style: "width: 300px" }); }); });';
document.getElementsByTagName('head')[0].appendChild(dojoDialogBox);
function myFuncc() {
myDialog.show();
}
1 Answer