Text Input Losing (??) Focus Causing Auto-Save Function To Trigger

Text Input Losing (??) Focus Causing Auto-Save Function To Trigger

  
Hi guys,

So I have a webapp with a form for the user to fill out. Because I want to have their progress saved as they go so they don't lose any data if they get disconnected, each input field triggers a save function via the IDE 'On Change' event.

My understanding of OnChange() function in .Net and JS is that it is only triggered when you lose focus on the text box. However, the fields are being saved as the user is typing causing the app to slow down dramatically on my test tablets (iPad, iPad Mini, Galaxy). The save function is also being triggered on my desktop (Chrome, IE11) while I'm typing but the slow down isn't as dramatic.

Can anyone point me in the right direction to solve this problem?


Solution

OnChange is set to fire when:

* Field loses focus

* User stops typing for around 200ms

If this isn't the behavior you want, use jQuery to hook the OnBlur event, and the FakeNotifyWidget in RichWidgets to trigger the server side event from the OnBlur.


J.Ja

Solution
Justin James wrote:

OnChange is set to fire when:

* Field loses focus

* User stops typing for around 200ms

If this isn't the behavior you want, use jQuery to hook the OnBlur event, and the FakeNotifyWidget in RichWidgets to trigger the server side event from the OnBlur.

 

J.Ja

Thanks Jusin.
Solution works a treat.

-H