Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

184
Vistas
Form Submission returns 'Undefined' pop up

I have a form I try to submit that can potentially have a lot of data and some users get a simple alert 'Undefined' when trying to submit. I've tried to replicate the issue on my local machine, on our test server and in production and I have no issues with all 3 environments.

I receive no error logs from our logging which leads me to think that it is an issue in the browser or front end since I would probably get a log message if it reached the backend.

...
<form id="WorkplaceIncidentForm" class="incidentReport text-center">
...
<button type="button" class="btn btn-info btn-lg" onclick="SendForm()">Submit</button>
...

function SendForm() {
   var form = $("#WorkplaceIncidentForm").serialize();
        var message = checkInputs();

        if (message === "valid") {
            $.ajax({
                type: "POST",
                url: "@Url.Action("Submit","Form")",
                data: form,
                dataType: 'json'
            })
                .fail(function (result) {
                    alert(result.message);
                })
                .done(function (result) {
                    if (result.success) {
                        alert('Successfully submitted!')
                        window.location.href = '../Form/ReportSubmitted';
                    }
                    else {
                        alert(result.message);
                    }
                });
        }
        else {
            alert('Please fill in ' + message + ' field.');
        }
}
about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda