dojo.hitch scope issue in onsubmit dojo/method -


i have onsubmit dojo/method within custom templated widget so:

try { if (this.validate()) { //console.debug(this); submitform(dojo.hitch(this, this.send)); } } catch (e) { console.debug(e); } return false;

when call this, scope within dojo/method dijit.form. how go getting scope of template widget instead?

i solved doing this:

dojo.connect(dojo.byid(this.form.id), "onsubmit", dojo.hitch(this, function(e) { e.preventdefault(); if (this.getform().validate()) { submitform(dojo.hitch(this, this.send)); } }) );


Comments

Popular posts from this blog

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -