adds post on javascript