2

I want to unblockui when stop loading page request is called.

dashboard: function(e,data) {
                    window.location = $("#dashboard-url").val()+"?trace_id="+data.id;
                      $.blockUI();
     }
 }

but before "window.location" page loads I press stop loading page in browser still UI is blocked. is there any method with which I can unblock ui when stop loading page request is called.?

Tomasz Kowalczyk
  • 10,472
  • 6
  • 52
  • 68

1 Answers1

1

It is not possible to detect when the user cancel a page loading with javascript. See this discussion: Detect when user clicks link, but aborts

Community
  • 1
  • 1
Daniels118
  • 1,149
  • 1
  • 8
  • 17
  • can we do it with some other technology apart from Javascript? – Shashank Mittal Dec 17 '14 at 13:19
  • You can use some workaround with javascript as setting a timeout to check if the page hasn't refreshed in a reasonable time. Other tecnology means a plugin for the browser or a customized browser. The better way would be to use ajax to load the content instead of the classic window.location redirect. – Daniels118 Dec 17 '14 at 13:31