Hello everyone I need your help I'm creating a form validation in jquery for this I'm doing it in two js files:
The first with a function to validate and the second with a function to send the form data using ajax. The problem is that I want to use the function of the ajax.js file inside the validation-form.js file
//ajax.js
$(document).ready(function() {
function SendForm(){
//Codigo
})
/ ********************** /
//validacion-form.js
$(document).ready(function() {
function Validar(){
//Codigo
SendForm();//Aqui llamo la funcion dentro de validacion-form.js
})
I get the following error:
Uncaught ReferenceError: SendForm is not defined
I think it might be for $ (document) .ready (function () {}) but if I delete this I can not use some of the functions of my code. I need your help please.