Hello i need to know how to refresh the page after i submit an ajax form. Atm i'm using an onClick function it seems it refreshes the page but i still need to press f5 to see the changed i made.
js:
<script>
function reloadPage()
{
location.reload()
}
</script>
form:
echo'<form class="imageform" method="post" enctype="multipart/form-data" action=\'clase/app/admin_activare_oferta.php\'>';
echo'<input type="hidden" name="id_oferta" value="'.$oferta.'">';
echo'<input type="submit" id="activ" value="" onclick="reloadPage()"></form>';
I know why i need to press on the button twice to see the change, because i need to run that refresh after ajax submits.
document.location.reload(true)
– nanobash