fixing javascript in posts#new