09-23-2016, 09:01 PM
To debug it, you can try replacing the javascript...replace the following:
if (data != '0') {window.location.replace(data);}
with this:
if (data != '0') {
alert("Refresh");
}else{
alert("Nothing");
}
That should display "Refresh" when the return from the PHP page is the refresh URL, and "Nothing" when it should be doing nothing. Maybe that will help? I think things were working okay for me, but perhaps it was refreshing and I just didn't notice.
*edit*
It could be another bug too...feel free to paste what you think is relevant and I can look through it. I just checked again and it seems to be working fine in my case (i.e. no refresh except when the certain conditions are met).
if (data != '0') {window.location.replace(data);}
with this:
if (data != '0') {
alert("Refresh");
}else{
alert("Nothing");
}
That should display "Refresh" when the return from the PHP page is the refresh URL, and "Nothing" when it should be doing nothing. Maybe that will help? I think things were working okay for me, but perhaps it was refreshing and I just didn't notice.
*edit*
It could be another bug too...feel free to paste what you think is relevant and I can look through it. I just checked again and it seems to be working fine in my case (i.e. no refresh except when the certain conditions are met).