add a new post javascript event basic