Inline event not triggered for gantt chart


I added an event handler for the onsave inline edit event for a gantt chart on my web page. It works the first time the web page is loaded but when the user leaves the web page and then comes back to the web page, the onsave inline event is not triggered. I am adding the event handler using the following code:

How can I fix this issue?