Open inestyne opened 8 years ago
To clarify, this is what i've come up with and i'm looking for a more appropriate way of expressing it.
$(document).bind("ajaxSend", function(event, xhr, options){
if (options.data.indexOf('user[user_type_id]') > 0)
{
if(!confirm('Are you want to change this client?'))
{
xhr.abort();
}
}
});
Some of the text fields and selects i'm using this on need to be confirmed when they are changed. Is there any way to do that with options or added script?
I've started capturing mousedown events, but this doesn't seem like the correct approach: