I am trying to add object to attribute using javascript but it is passing as object object.
var choice = {'name':'one',id:1}
COde
return '<a href="/users?userId='+
choice.id+'" class="tool-tip" title="'+
choice.name+'"><span data-desc="'+
choice+'">'+this.label(choice)+'</span></a>';
it is creating as
<a href="/users?userId=1" class="tool-tip" title="userName">
<span data-desc="Object Object"></span></a>
Where i am dong wrong?
this.labeltoothis.label()? What do you need to write insidedata-descattribute? This are the details that you need to provide if you want a valid answer. See: stackoverflow.com/help/how-to-ask