Put the scripts in the HTML head. Also, finally fixed the bug with two click events firing form validation