I am working in PHP, and I call a Javascript function like this:
?><script type="text/javascript">send_information();</script><?php
After that, I change the value of a session variable and refresh the PHP page (after refreshing some stuff is displayed on my web app) I would like to wait until the execution of my javascript function is done before refreshing the page.
I looked for something like a timer but did not find what I was looking for, also I looked for a way to send a variable from JS to PHP at the end of execution and put a "while" in my PHP, waiting for this variable but I understood that this is not possible...
(I am not looking for the difference between client side and server side, this question is totally different! :) )