Simple click on the active input the "Domsubtreemodified" event

Asked

Viewed 117 times

0

I’m using this code:

document.body.addEventListener('DOMSubtreeModified', function () {            
    document.title = 'Editar Material *';
    formChanged = true;
}, false);

To check for any changes in the various forms and possible images to edit. The problem I found was the following: just a click on a :input to trigger the event.

It is possible to skip the simple click on the :input without any change? I know there are more correct ways to check for changes in the forms, but I need to use something like this.

  • Can you give more details or create an executable mini example? What you’re doing is an "Edit in place"?

  • What do you mean "Edit in place"? There’s too much code for me to put here, it’s a thousand lines of javascript in an Razor view.

  • Jeditable: http://www.appelsiini.net/projects/jeditable/default.html The 8 best plugins Edit In Place de Jquery: http://www.gaomeweb.com/8-best-edit-in-place-jquery-plugin/

  • I’m not wearing any of that. I am using Razor to create the inputs and that, then the data is loaded through several ajax calls, because I load data from several tables. I wanted to make my code a little better, but if the user does not click on any field it has the effect they wanted. (the code that was already implemented showed the warning ALWAYS)

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.