I don't think you can. There is a web service to mark a manual activity as complete but it is not callable by AJAX.
You could, I suppose, develop a new (local) plugin to provide a suitable web service call. It's all documented in the developer wiki but it's fairly advanced stuff.