Helpful Information
 
 
Category: Ajax and Design
ajax: stop and continue redirect

How do we stop and continue redirecting? example is when logging in codingforums.

Is this possible with AJAX?

How do we stop and continue redirecting? example is when logging in codingforums.

Is this possible with AJAX?

login of codingforums is without AJAX:
you're in page A, compile the form with your usern and passw, press submit.
so you're redirected to page B, which checks for your authentication. if succeeds, wait a few seconds and then send you back to A. if not, it gives you an error etc...
it's something like this:


if authentication == OK
then
<script>
function doRedirect() {
location.href = "the page where you come from";
}

window.setTimeout("doRedirect()", 4000);
</script>
else
go to error page
etc..


with AJAX:
you are on page A, you compile the form and press submit, AJAX with Javascript contacts the server and look if you can be authenticated or not, and then tells you, always staying on page A.

so, the example you asked for is without AJAX










privacy (GDPR)