updated js enter function and dropdown