PDA

View Full Version : not able to trigger click event from the updated href:



Sameer Khan
24 Feb 2016, 11:50 PM
own vote


favorite
(http://stackoverflow.com/questions/35621152/how-to-update-the-href-from-ajax-response-in-extjs#)



I need to update the href element depend upon ajax response and need to trigger click event from the appended href
I am doing in the fallowing way:
but not able to trigger click event from the updated href:









HTML<a hidefocus="on" class="x-tree-node-anchor" href="#" tabindex="1" target="contentFrame">Audit</a>ExtJslisteners: { click: { fn: function(node,event){ Ext.Ajax.request({ url: '/ms/module/external-a/api/'+treeId+'/fetch-child/'+UUID, method: 'GET', success: function (response) { var addInfoRes = Ext.util.JSON.decode(response.responseText); var additionalInfohref = addInfoRes.href // "/member/erp/config?node=12"; jQuery("#123").attr('href',additionalInfohref); } }); } },stopEvent: true}

Gary Schlosberg
25 Feb 2016, 6:42 AM
My experience with jquery is limited, but perhaps you need the 123 ID in your link?