Add javascript for inputs