JS: put event handler to handle form submittion - for later use