I want to perform click action on a displayfield in extjs. It doesn't have click listeners so i added <a></a> tags in its html as follows:
obj = {a: 123, b: 'abc' }
html: '<a href="javascript: Ext.ux.classobj.method('+obj+')" ><img src="image.png" /></a>'
The problem is I can't pass object dynamically. Means the above <a></a> doesn't call the method and fires an error as it calls :
javascript: Ext.ux.classobj.method(object Object)
However, if i use static values like
html: '<a href="javascript: Ext.ux.classobj.method({a:123, b:'abc'})" ><img src="image.png" /></a>'
This method will be called without any error as it calls:
javascript: Ext.ux.classobj.method({a:123, b:'abc'})
Does anyone knows how to do this? Thanks a lot for help
Regards
[object Object]