Preventing my form to refresh using ajax

You can use the e.preventDefault() when your submit function is triggered.

function onSubmit(e){
   e.preventDefault()
   .... rest of code
}

Browse More Popular Posts

Leave a Comment