how to get response from form submit in javascript