ajax submission for the voting function