Javascript works in edit and new user pages