Make javascript for edit view