I buy the full version of grid. i add my delete col new and i want when i press my own delete button it will first show me confirmation message and then delete as like normally.
but when i use in this grid delete button and press my page link : delete.php but before not confirmation message appear or display like javascript.
can you please guide how to fix it.
thankx
1 Answers
You can put javascript code in your <a> tag using onclick event.
e.g.
$col["default"] = "<a target='_blank' onclick='return confirm("Are you sure?")' href='http://abc.com/delete.php?id={id}'>Delete</a>";
Src: http://stackoverflow.com/questions/10462839/javascript-confirmation-dialog-on-href-link
Your Answer