javascript - Simple dojo example Error: this.domNode is null -
referring jsfiddle's [code][1] cswing, why indicate "typeerror: this.domnode null (26 out of range 15) in dojo.js".
here code copied cswing, learning , testing,
<!doctype html> <html> <head> <style> html, body /*standard layout every dojo webpage*/ { width: 100%; height: 100%; padding: 0px; margin: 5px; overflow: hidden;/*no scrollbar used*/ } #standby { position: absolute; top: 50%; left: 50%; width:32px; height:32px; margin-top: -16px; margin-left: -16px; /* width: 300px; height: 300px; background-color: #e7e7e7; */ } </style> <link rel="stylesheet" href="../dojo1_8/dijit/themes/claro/claro.css"> <script>dojoconfig = {parseonload: true}</script> <script src="../dojo1_8/dojo/dojo.js"></script> </head> <body class="claro"> <div id="standby"> <div id="btn" data-dojo-type="dijit.form.button" data-dojo-props="label: go'"></div> </div> <script> require(["dojox/widget/standby","dijit/form/button", "dojo/store/memory",'dijit/form/combobox', "dojo/on", "dojo/domready!"], function(standby, button, memory, on, combobox) { var standby = new standby ({ id: "standbyobj", target: "btn", color: "transparent", zindex: "auto", duration: "1000" }); dojo.body().appendchild(standby.domnode); standby.startup(); on(dojo.byid('btn'), 'click', function() { standby.show(); //simulate request. hide timeout in 5 seconds settimeout(function() { standby.hide(); }, 5000); }); }); </script> </body> </html>
please advise. clement [1]: http://jsfiddle.net/cswing/253te/
looking @ original fiddle, believe that
dojo.byid('btn')
should be
dijit.byid('btn')
if doesn't solve problem, set firebug break on errors. when error occurs, @ stack trace find more information error coming , might causing it.
Comments
Post a Comment