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

98
Vistas
Blank alert box when try to show text from an AJAX response

I have problem with alert in jquery. I want to print a information after the AJAX operation working, but i have an issue about using alert. When i using the alert syntax, it returns blank alert box, but when i checked it using console.log, the string is shown.

Here is my code that i used to print the result:

$.ajax({
            data:...
            method:'POST',
            dataType:"json",
            url: ...,
            contentType:"application/json",
            error:function(error){
                var resp = JSON.parse(error["responseJSON"]);
                var st = JSON.stringify(resp["status"]);
                var dtl = JSON.stringify(resp["details"]);
                var warning = "Status :"+st+"\\n details :"+dtl;
                alert(warning);
                },
            success:function(response){
                var resp = JSON.parse(response["responseJSON"]);
                var st = JSON.stringify(resp["status"])
                var dtl = JSON.stringify(resp["details"])
                var warning = 'Status :'+st+'\\n details:'+dtl;
                alert(warning);
        })
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