Catch form-ajax-submit-onchange programmatically


#1

Hi,

I like the built in catch form-ajax-submit-onchange function. But I do have a case now where I can not just call a URL on submit. It is a JSON API and I need to process the request internally. Is there an easy way to just catch the built in form/submit/onchange event instead of calling the url given in the form action attribute?


#2

Hi! Try this:
in HTML:

<input  action="javascript:void(0)" onchange="SomeFunction()">

in app.js

function SomeFunction () {
  ///... submit event code...  
}

#3

Hi… yes - this should do the job. The built in function does all this already very handy and I was just wondering if there is a way to use it instead of catching all changes again for this purpose by simply redirect the default ajax request to a function instead… somehow.