delete custom message confirmation.

Questionsdelete custom message confirmation.
Mohammad asked 10 years ago

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
Abu Ghufran answered 10 years ago

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

2 + 6 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?