The ft:search:noresultsloaded event is sent when no results are loaded on the Search page. The following example shows how to use the ft:search:noresultsloaded event:
document.addEventListener('ft:search:noresultsloaded', function (event) {
if (window.location.href.indexOf('/search/all') != -1) {
window.alert('We no document corresponding to your search');
}
});