$crud->add_action('EXCLUIR', '', '', 'ui-icon-trash', array($this, 'botaoExcluir')); function botaoExcluir($primary_key, $row) { return "<script>alert('test');<script>"; }
Thanks for help!
⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠
Posted 12 December 2015 - 12:05 PM
$crud->add_action('EXCLUIR', '', '', 'ui-icon-trash', array($this, 'botaoExcluir')); function botaoExcluir($primary_key, $row) { return "<script>alert('test');<script>"; }
Thanks for help!
Posted 18 January 2016 - 13:48 PM
Hi Felipe Saraiva,
I will suggest you return "javascript:somefunction()" rather then the script code. By doing this, you can then give the alert popup or whatever you want to achieve with it.
Happy GCing :)