I have a gsp page index where I have a data table. On Click of the edit icon I want to redirect to edit view. I have tried some code over here but no result. It is redirecting to the index page itself. Can anyone please help me on this please? Here are my attempts below ::
$('#example').on('click', 'a.edit-reference_1st', function (e) {
var selectRow = $(this).parents('tr');
var control = this;
var referenceId = $(control).attr('referenceId');
// alert(referenceId)
window.location.href = '<g:createLink action="edit" id="${referenceId}" />'
// window.location.href="${createLink(controller: 'audio', action:'edit')}"+'/'+referenceId;
});