We're going to be checking the form using a function, which will be activated by the form's submit event — therefore, using the onSubmit handler. Text Validations in Cypress; Getting HTML form values and display on console in JavaScript? How to call a JavaScript function from an onsubmit event? Im new to jQuery and AJAX so it was my mistake. you should use getElementById(“fileSelect”) and ID your form appropriately. Our form validation script in this case simply checks that a value has been entered in each of the two form fields. The submit event fires when the user submits a form. Thanks, Tracy, However, I'm trying to say the following: