changed function to use onsubmit
Merge remote-tracking branch 'origin/master'