Add javascript for fields #4