Answer the question
In order to leave comments, you need to log in
How to make it work first popup ( js ) and then php?
Good day !
I would like to know how to implement such a thing - so that:
let's say I click on a button and I don't want the php script to be executed immediately - but only if I have an option in js - for example: do you want to exit? ( yes ) - php script is being executed ( no ) php script is not being executed. I still can't figure out how to connect.
I hope my question is clear!
Thank you very much !
Answer the question
In order to leave comments, you need to log in
Need javascript.
For your example (e.g. logging out via /logout link)
if ( confirm('Вы хотите выйти?') ) {
location.href = '/logout';
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question