CodeByZach / pace

Automatically add a progress bar to your site.
https://codebyzach.github.io/pace/
MIT License
15.68k stars 1.9k forks source link

show when submitting a form #115

Open ccfiel opened 10 years ago

ccfiel commented 10 years ago

Is it possible to show the progress animation after a submit button is click?

facundofarias commented 10 years ago

Same issue. The bar is showed when it is doing the first loading, but it is not shown then the form is submitted :(

Fed0t commented 10 years ago

Same issue...when i click the submit button to send data to another page with POST the loader not starting only after my sql query is finished and the new page is refreshed!

Id like to show the progress bar when i push the button ! (in google chrome the mini loader from TAB is there and i like to show PACE loader in same time)

franc014 commented 9 years ago

Hi. Sure, it does not work when submitting via normal POST. Using jquery is possible to control this for every request. Hope there's a similar solution.

ghost commented 9 years ago

it always works for ME

I use Auto Complete Search which is based on MySql . It show progress bar when data is sending when finished progress done and results shows. :+1:

My PACE.min.js main code ajax:{trackMethods:["GET","POST"]

farvisun commented 5 years ago

you can configure pace for handle ajax post request. just change source code on defaultOptions segments and set ajax track methods to ['GET','POST']

callow commented 5 years ago

if we dont use ajax. use form submit. it wont be triggered.

KinoLien commented 4 years ago

You don't need to change any source code, just add the followings before pace loaded:

window.paceOptions = {
    ajax: { trackMethods: ['GET', 'POST'] }
};

It works for me.