osAjaxBackend.BindBeforeSubmit is being triggered in onchange of input

osAjaxBackend.BindBeforeSubmit is being triggered in onchange of input

  

Hi,

osAjaxBackend.BindBeforeSubmit is being trigger when the OnChange of an input is triggered. There is any way of differentiate this OnChange from a submit button?

Regards,

Marcelo

Hi Marcelo.

Can you please describe what are you trying to accomplish and what's your issue currently?

You can also use the onchange using javascript on the input extended properties if that is what you need.

Cheers,

GM

Hi Gonçalo,

The component Custom Masks has a problem that I wanted to solve. So I was wondering why osAjaxBackend.BindBeforeSubmit doesnt trigger only on submit but also in ajax. Since the name is submit and the on change elements use OsAjaxDelayed. 

When you recommend using the onChange you were refering use a OsAjaxDelayed or use the fake notify? because the fake notify I tried before but it only triggers when I lose the focus on the element even if I'm using the onchange.

Regards,

Marcelo

Hi Marcelo.

As I understood, that happens because you'll use an Ajax submit, so I think take makes sense as is.

The method I mentioned (not recommended) was using an inline javascript onchange script on your element extended properties, just for testing. 

If this is the path, a better practice should be creating a method on your Javascript file to bind to the element (on your case I think it's the input).

Cheers,

GM