How to stop invoke a method more than one times

How to stop invoking a method more than one times when this method has
submitted to server.My shopping system have methods to manage
bill,ship,pay…
But i found when i was submitting a method such as bill,i can still
flush or use keyboard in the browser to invoke this method many
times.This will make one cart corresponding many
bill,ship,pay…parts.But i wish that one cart can only correspond one
bill,ship,pay…part.How do i make this reality?
Thank you

You could use JavaScript to disable the submit after the first time.

On Feb 9, 5:44 am, Guo Y. [email protected]

Use the :disable_with parameter in your form submit tag

On Feb 9, 9:44 am, Guo Y. [email protected]

Thank you!I will try it.It should be like that.

Mukund wrote:

Use the :disable_with parameter in your form submit tag

On Feb 9, 9:44 am, Guo Y. [email protected]