Function this parameter on onclick
- by Jerome
I've some html code generated in javascript like this
cell.innerHTML = '<a href="#" class="sortheader" id="sortheader_'+i+'" '+
'onclick="ts_resortTable(this, '+i+');return false;">' +
txt+'<span class="sortarrow"></span></a>';
I'd like to call the function ts_resortTable() but independently of the onclick event how can i generate the "this" parameter of the function?
I tried the DOM selector : $('sortheader_'+i) in jQuery and the getElementById('#sortheader_'+i) as well but it's not working