HOW TO add JavaScript confirmation to link fields?

Talk and info about common issues

Moderator: alexandrleonenko

administrator
Site Admin
Site Admin
Posts: 6176
Joined: Jan 7th, '09, 23:18
Contact:

HOW TO add JavaScript confirmation to link fields?

Postby administrator » Dec 18th, '20, 09:05

Sometimes you need to get confirmation before allowing link action.
For example, when you want to perform some action or delete something.

Simple add confirmation alert in a following way:

Code: Select all

"on_js_event"=>"onclick='return confirm(\"Are you sure?\");'"

Return to “ApPHP DataGrid {HOW TO}”