diff --git a/ChangeLog b/ChangeLog index 554f87236..f00191eac 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2010-11-16 Wolfgang Sourdeau + + * UI/WebServerResources/generic.js: (onCASRecoverIFrameLoaded): + the ajax recovery request is now performed from a timeout attached + to the window, to make sure it does not reference the iframe + itself. The iframe is removed from a similar timeout, to avoid + reference errors and a continuous spinning wheel after a recovery + request. + 2010-11-15 Francis Lachapelle * UI/WebServerResources/MailerUI.js (refreshMailbox): now calls diff --git a/UI/WebServerResources/generic.js b/UI/WebServerResources/generic.js index adf00e5e5..cdfb5fc9d 100644 --- a/UI/WebServerResources/generic.js +++ b/UI/WebServerResources/generic.js @@ -262,19 +262,23 @@ function onCASRecoverIFrameLoaded(event) { if (this.request) { var request = this.request; if (request.attempt == 0) { - triggerAjaxRequest(request.url, - request.callback, - request.callbackData, - request.content, - request.paramHeaders, - 1); + window.setTimeout(function() { + triggerAjaxRequest(request.url, + request.callback, + request.callbackData, + request.content, + request.paramHeaders, + 1); }, + 100); } else { window.location.href = UserFolderURL; } this.request = null; } - this.parentNode.removeChild(this); + var this_ = this; + window.setTimeout(function() { this_.parentNode.removeChild(this_); }, + 500); } function onAjaxRequestStateChange(http) {