added auto generated identifier in javascript, if pÃlan id field is left empty