Hi all,
i want to put in datagrid, and much button.
i have a global event listener:
(simplifying)
$(document).on('click', function() {
console.log('trallala');
…
}); what happens:
Loading the page, and run the listener.
An onclick event add a datagrid.
The datagrid formatter add buttons for all row.
error:
The global event listener dont catch on the buttons.
how can i enabled this global event listener?
te real event listener:
$(document).on('click', '[data-ajaxobj]:not([data-ajaxobj=""])', function(){
console.log('opopo');
var json = $(this).data('ajaxobj');var win = $(this).data('win');
if( !$.isPlainObject(json) || typeof json !== 'object' ) {json = jQuery.parseJSON( json.replace(/'/g, '"') );}
if( win != "" && win != undefined) {
if( AdminControll.Windows[win] == undefined ) {AdminControll.addWindow( json );
} else {AdminControll.Windows[win].AjaxObj.Start( json );}
} else {new AjaxObj().Start( json );}
return false;
});