1

I am posting modal data to a back end using HTML post and action attr. The form post fine and updates the backend as well the only thing is after pressing submit the url changes and takes me to my POST url. How can this be stopped? I want to stay on the same page after clicking submit and just have the backend update without being taken to my POST url.

<form method="POST"id="goForm"action="http://post_endpoint"enctype="application/x-www-form-urlencoded">
    Name: <input type="text" value="">
    <button type="submit value="submit">Send<button>

</form>
iceberg
  • 113
  • 1
  • 3
  • 8
  • possible duplicate of [Prevent redirect after form is submitted](http://stackoverflow.com/questions/4038567/prevent-redirect-after-form-is-submitted) – Chad Nouis Sep 09 '15 at 18:03

1 Answers1

1

To submit an HTML form without reloading the page, you have to use Javascript.

Here is a similar question with answers: Submit form without page reloading

Community
  • 1
  • 1
vinhboy
  • 8,542
  • 7
  • 34
  • 44