Adding the following code to ModalRemote.js will allow users to easily redirect if they require instead of showing the modal.
function successRemoteResponse(response) {....if (response.redirect !== undefined && response.redirect) {window.location.replace(response.redirect);}....
In my case, I wanted to create a database entry and then redirect to the view page. Using the yii redirect in the controller can cause a 301 error showing briefly in the modal box before redirecting.
Adding the following code to ModalRemote.js will allow users to easily redirect if they require instead of showing the modal.
function successRemoteResponse(response) {
....
if (response.redirect !== undefined && response.redirect) {
window.location.replace(response.redirect);
}
....
In my case, I wanted to create a database entry and then redirect to the view page. Using the yii redirect in the controller can cause a 301 error showing briefly in the modal box before redirecting.