update input with js