Adding JS for OK button