Tuesday, February 4, 2014

'onClick' of object [object Object] is not a function

Getting this error when using dojox.mobile.ListItem likely means you need to change something like this:

<li data-dojo-type="dojox.mobile.ListItem"
   data-dojo-props="clickable:true, onClick:this.app.openView(null,{target:'Something'})"
   >Whatever</li>

 
 

...to something like this:

<li data-dojo-type="dojox.mobile.ListItem"
   data-dojo-props="clickable:true, app: this.app, onClick:function()
         {this.app.openView(null,{target:'Something'})}"
   >Whatever</li>

No comments:

Post a Comment