Change the default confirmation before saving a record |
2/8/2016 10:58:26 AM |
PHPRunner General questions | |
P
pmorenoc07 author
Hi,
|
|
![]() |
Sergey Kornilov admin 2/11/2016 |
Unfortunately this won't be easy. The problem is that built-in confirm() function is synchronous while all confirm replacements like 'sweetalert' are not. This means code execution won't stop when sweetalert is displayed and record will be saved anyway, no matter what user chooses. |
P
|
pmorenoc07 author 2/12/2016 |
Unfortunately this won't be easy. The problem is that built-in confirm() function is synchronous while all confirm replacements like 'sweetalert' are not. This means code execution won't stop when sweetalert is displayed and record will be saved anyway, no matter what user chooses.
|
![]() |
Sergey Kornilov admin 2/12/2016 |
The best solution is to avoid using popups for this purpose. I don't know all details of your application but the use of popups of any kind is not the best practice. The better option is just to let user do what they doing with an option to rollback. |
P
|
pmorenoc07 author 2/15/2016 |
The best solution is to avoid using popups for this purpose. I don't know all details of your application but the use of popups of any kind is not the best practice. The better option is just to let user do what they doing with an option to rollback.
|
![]() |
Sergey Kornilov admin 2/15/2016 |
A couple of suggestions. All depends on your project details.
|