Thursday, 18 May 2017

Client/Server operation detection in NodeJS

I would like to have a spinner appear when a form has been submitted and then be replaced by a checkmark to indicate the operation has been completed. I already have JQuery detect when the button has been pressed and make the spinner appear like so:

$('.scrape').on('click', function(){
    $('.spinner').removeClass('hidden');
}) 

How can I have the client/server side detect that the operation has been completed? An AJAX call wouldn't work because the POST request has already been made, right? Note: I am working with the express framework. I'm not rendering anything because it's all on the same page.

Thanks!



via agomez

No comments:

Post a Comment