Use ajax to create tasks