added Save and Cancel buttons in Javascript