How to create a loading without AJAX

0

I have a download button that makes a GET request that does a Download. This happens all on the same page, but without AJAX.

You are not using the download tag. It is using Laravel that internally does the download service.

I would like to see a message on the same "Wait ..." button when I click the Download button.

When the page loading process was finished and the download started, return the previous button's message.

I tried to do this, but it does not work:

$('.btn-export').on('click', function(){
    $(this).text('EXPORTANDO...');

    $(window).on('load', function(){
        $('.btn-export').text('EXPORTAR');
    });
});

Any ideas?

    
asked by anonymous 02.03.2018 / 14:34

0 answers