Revision #3 has been created by Rutger on Jan 4, 2017, 5:46:56 PM with the memo:
Fixed jQuery(document).ajaxComplete, thx to @myvay
« previous (#2)
Changes
Title
unchanged
Using loginRequiredAjaxResponse to solve ajax session timeout
Category
unchanged
How-tos
Yii version
unchanged
Tags
unchanged
loginRequiredAjaxResponse, session, login, AJAX
Content
changed
[...]
```php
<?php
if (Yii::app()->components['user']->loginRequiredAjaxResponse){
Yii::app()->clientScript->registerScript('ajaxLoginRequired', '
jQuery("body"document).ajaxComplete(
function(event, request, options) {
if (request.responseText == "'.Yii::app()->components['user']->loginRequiredAjaxResponse.'") {
window.location.href = options.url;
}
}[...]