Interactive Form Element in Javascript