onTaskEndResize event is fired when user finished resizing a Task item, and only if user has actually resized the task.
One parameter is passed to the handler:
ganttChartControl.attachEvent("onTaskEndResize", function(task) { if (task.getId()==13) { task.setPercentCompleted(Math.min(100,parseInt(100 * task._initialCompleteHours/task.getDuration()))) ; } else alert("New duration = " + task.getDuration()); });