Skip to content

Instantly share code, notes, and snippets.

@tomwayson
Last active August 29, 2015 14:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tomwayson/26ca7d7447b763d8e767 to your computer and use it in GitHub Desktop.
Save tomwayson/26ca7d7447b763d8e767 to your computer and use it in GitHub Desktop.
Dijit Dialog
<!DOCTYPE html>
<html >
<head>
<!-- Dojo claro theme for Dojo Dijits -->
<link rel="stylesheet" href="//ajax.googleapis.com/ajax/libs/dojo/1.10.3/dijit/themes/claro/claro.css">
<!-- esri stylesheet not used by Dojo widgets, but if there were a map on this page, you'd need it -->
<link rel="stylesheet" href="http://js.arcgis.com/3.12/esri/css/esri.css">
<script>dojoConfig = {parseOnLoad: true}</script>
<!-- esri JS API includes all of Dojo, so you just need to include one script tag -->
<script src="http://js.arcgis.com/3.12/"></script>
<script>
require(["dijit/Dialog", "dijit/form/TextBox", "dijit/form/Button"]);
</script>
</head>
<body class="claro">
<div data-dojo-type="dijit/Dialog" data-dojo-id="myDialog" title="Name and Address">
<table class="dijitDialogPaneContentArea">
<tr>
<td><label for="name">Name:</label></td>
<td><input data-dojo-type="dijit/form/TextBox" name="name" id="name"></td>
</tr>
<tr>
<td><label for="address">Address:</label></td>
<td><input data-dojo-type="dijit/form/TextBox" name="address" id="address"></td>
</tr>
</table>
<div class="dijitDialogPaneActionBar">
<button data-dojo-type="dijit/form/Button" type="submit" id="ok">OK</button>
<button data-dojo-type="dijit/form/Button" type="button" data-dojo-props="onClick:function(){myDialog.hide();}"
id="cancel">Cancel</button>
</div>
</div>
<button data-dojo-type="dijit/form/Button" type="button" onClick="myDialog.show();">
Show me!
</button>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment