Javascript to create new post added