Occasional ajax response error { readyState=0, status=0, statusText="error"} using jquery
I think you need quotes in the data parameter like this:
data: { 'userid': settings.userid, 'taskname': $('#ff-add-task-name').val(), 'tasknote': $('#ff-add-task-note').val(), 'completed': $('#ff-add-task-completed').val(), 'priority': priority, },
See if that helps.