-
20 Sep 2011 6:32 AM #1
Grid column render function quote problem
Grid column render function quote problem
Hi,
I have a problem with quote in grid column renderer function
In html codeCode:renderer : function(value, metaData, record) { return "<a href='javascript:showDetail('" + record.get('id') + "');'>" + "<img src='edit.png'>" + "</a>"; }
How can I resolve please ?Code:<a 94');'="" href="javascript:showDetail("><img src="edit.png"></a>
Thanks
-
20 Sep 2011 11:03 PM #2
-
20 Sep 2011 11:10 PM #3Sencha - Community Support Team
- Join Date
- Nov 2007
- Location
- Helsingborg, Sweden
- Posts
- 2,455
- Vote Rating
- 50
This is not how you write JavaScript these days:
Instead just create a simple basic 'A' tag and listen for itemclick on the grid instead:Code:href='javascript:showDetail('" + record.get('id') + "');'>"
http://docs.sencha.com/ext-js/4-0/#!...vent-itemclick
in the handler you can use the 'e' argument to try to find a certain class on your a-tag that you have defined via:
Code:if (e.getTarget('.your-class')) { // The link was clicked }
-
21 Sep 2011 1:38 AM #4


Reply With Quote