Ajax submits the form twice

420 0 0 0

Last Updated : 2024-05-02 09:56:13

Sometimes you will have ajax submitting the form twice, you can stop this by using the following :

e.preventDefault();
e.stopImmediatePropagation();

Mohammed Anwar

Mohammed Anwar

Experienced technical lead PHP, MySQL and Laravel Developer for 15+ years, with proven ability to develop and create high-quality and optimized web applications. Great ability to build and optimize database design, schema and queries. Versed programing trainer and instructor delivering web courses and helping others to get into the field in a timely manner. Fast and eager learner for new technologies .