I am using Joel Purra’s changePolling() plugin to trigger the change event on the text inputs. I really liked it as it has relieved me from the headache of tracking changes in various input controls. The reason to use the plugin is that I have few collapsible panels in my form. When the user chooses to view the data, I load the data through AJAX call. When the user makes changes in any of the text inputs I mark the panel as “TOBE_SAVED” so that when the user opts to save, I save only the panels that are eligible for saving (marked as “TOBE_SAVED”). Now everything works fine as the changepolling fires the text input change event even if user copy pastes the contents but the issue is that when I load the data through AJAX call and assign values to text input, this triggers the change event marking panel as “TOBE_SAVED” at the first time only. I need to know, how do I take care of this scenario. Specifically, I will request @Joel Purra to suggest me something as he has developed the plugin.
The workaround is that I keep a check that if the data is loaded for the first time, the panels should not be marked as “TOBE_SAVED” but still would like to know, if there is a better way to handle this such as suspend changePolling plugin.
Thank you all in advance.
1 Answer