<div dojoType="dojo.Dialog" id="alarmCatDialog" bgColor="#FFFFFF" bgOpacity="0.4" toggle="standard">
<div class='dijitInline'>
<input type='input' class='dateWidgetInput' dojoAttachPoint='numberOfDateNode' selected="true">
</div>
how to show this dialog I tried dijit.byId('alarmCatDialog').show();
The above code is a template and I called dijit.byId('alarmCatDialog').show()
from the .js file .
dojo.attr(this.numberOfDateNode)
this code works and I got the data .but if I change dojoattachpoint to id then I try dijit.byId('numberOfDateNode')
will not work;
Your numberOfDateNode is a plain DOM node, not a widget/dijit, i.e. javascript object extending dijit/_Widget
, which is the reason you cannot get a reference to it via dijit.byId("numberOfDateNode")
. Use dojo.byId("numberOfDateNode")
instead and you are all set.
dojoAttachPoint
or its HTML5 valid version data-dojo-attach-point
is being used inside a dijit template to attach a reference to DOM node or child dijit to dijit javascript object, which is the reason dijit.byId('alarmCatDialog').numberOfDateNode
has a reference to your <input type='input' class='dateWidgetInput' .../>
.
The main reason to use data-dojo-attach-point
is that:
dijit.byId/dojo.byId
. If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With