# onResponse and onResponseStart not working

**URL:** <https://forum.mautic.org/t/onresponse-and-onresponsestart-not-working/7956>\
**Category:** Development\
**Created:** [March 17, 2017, 12:28pm UTC](https://forum.mautic.org/t/onresponse-and-onresponsestart-not-working/7956 "2017-03-17T12:28:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![csnawani](https://avatars.discourse-cdn.com/v4/letter/c/e274bd/32.png) [@csnawani](https://forum.mautic.org/u/csnawani)\
**Post date:** [March 17, 2017, 12:28pm UTC](https://forum.mautic.org/t/onresponse-and-onresponsestart-not-working/7956/1 "2017-03-17T12:28:16Z")

</div>

I want to make a ajax call after submitting the form. i am using javascript for this  
  
  
  
if (typeof MauticFormCallback == ‘undefined’) {  
  
var MauticFormCallback = {};  
  
}  
  
MauticFormCallback = {  
  
onValidateEnd: function (formValid) {  
  
alert(‘onValidateEnd’);  
  
console.log(“onValidateEnd”);  
  
},  
  
onResponse: function (data) {  
  
alert(‘onResponse’);  
  
return false;  
  
},  
  
onResponseStart: function (response) {  
  
// called to process the response to the form submission  
  
alert(‘onResponseStart’);  
  
}  
  
};  
  
onValidateEnd is working but onResponse and onResponseStart not working can anyone please let me know why this is not working.

---

<div class="post-metadata">

**Author:** ![csnawani](https://avatars.discourse-cdn.com/v4/letter/c/e274bd/32.png) [@csnawani](https://forum.mautic.org/u/csnawani)\
**Post date:** [March 17, 2017, 12:28pm UTC](https://forum.mautic.org/t/onresponse-and-onresponsestart-not-working/7956/2 "2017-03-17T12:28:16Z")

</div>

I want to make a ajax call after submitting the form. i am using javascript for this

if (typeof MauticFormCallback == ‘undefined’) {  
var MauticFormCallback = {};  
}  
MauticFormCallback[‘signup’] = {  
onValidateEnd: function (formValid) {  
alert(‘onValidateEnd’);  
console.log(“onValidateEnd”);  
},  
onResponse: function (data) {  
alert(‘onResponse’);  
return false;  
},  
onResponseStart: function (response) {  
// called to process the response to the form submission  
alert(‘onResponseStart’);  
}  
};  
onValidateEnd is working but onResponse and onResponseStart not working can anyone please let me know why this is not working.
