Yoskaldyr
Well-known member
This function not properly worked if redirect url has a hash (file xenforo.js):
Example:
User fills overlay autovalidator form on page 'http://xenforo.sample.forum.com/somepage/form/'
If XenForo Controller returns responseRedirect with url http://xenforo.sample.forum.com/somepage/form/ then browser will reload current page after form validation and submit.
If XenForo Controller returns responseRedirect with url http://xenforo.sample.forum.com/somepage/form/#somehash then browser will stay on the same page without page reloads after form validation and submit.
Code:
redirect: function(url)
{
url = XenForo.canonicalizeUrl(url);
if (url == window.location.href)
{
window.location.reload();
}
else
{
window.location = url;
}
},
User fills overlay autovalidator form on page 'http://xenforo.sample.forum.com/somepage/form/'
If XenForo Controller returns responseRedirect with url http://xenforo.sample.forum.com/somepage/form/ then browser will reload current page after form validation and submit.
If XenForo Controller returns responseRedirect with url http://xenforo.sample.forum.com/somepage/form/#somehash then browser will stay on the same page without page reloads after form validation and submit.
Last edited: