Skip Navigation

[Resolved] Run script after AJAX submission on CRED

This support ticket is created 5 years, 9 months ago. There's a good chance that you are reading advice that it now obsolete.
Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 0 replies, has 1 voice.

Last updated by Paul 5 years, 9 months ago.

Assisted by: Waqar.

Author
Posts
#1236081

Hi There,

Is there a way to redirect a user to a specific page after an ajax submission using CRED?

The way it is setup:

A user fills out a form, it then submits via AJAX showing the loading icon, which then shows a custom message after. Upon hitting that custom message content i would like to redirect them to an URL after 5 seconds.

Now, I am not great at Javascript so bare with me as i have attwempted to form a solution yet it did not work. Is there a specific thing i must call to make this redirect work after the ajax submission is successful?

jQuery( document ).on( "ajaxSuccess", function() {

function Redirect()
{
window.location="hidden link";
}
setTimeout('Redirect()', 5000);
});

Thanks,
Liam