Hi.
I have this problem. I am not able to fix it. Let me explain it.
I have a button. After the user clicks on it, I do some stuff in the server part, preparing a string to pass to the client After with an URL to call an external php script. Also I decide there if the user has already finished the input and if so, I unset the variables from $_SESSION in order to logout the user. All is fine here. I get to the Client After part of the button process and there, if everything is fine (ie. the user was logged out programmatically) then I want to refresh the page, doing this, the login page will appear instead the one they have now. If not, I want to stay in the same page. So in the Client After I need to do this refresh.
In the server part I pass some parameters to the Client After to decide what to do.
Here is my Client After:
if (result["error"] != "") {
alert(result["error"] + result["errormsg"])
} else {
location.reload(true); // This is not working here
alert("Some message");
location.href=result["topdf"]; // To generate and send a pdf file to the user.
return;
}
The thing is: "location.reload(true);" is not working at all here. I get the alert("Some message") And the result of the location.href as well. But the page is never reloaded.
I am lost. I don't know how to do this. Even I don't know this can be done here.
If anyone has another idea or any points to solve this, I'll appreciate your comments.
If you need something else, let me know.
Thanks for your time and best regards,