• Jobs
  • About Us
  • professionals
    • Home
    • Jobs
    • Courses and challenges
  • business
    • Home
    • Post vacancy
    • Our process
    • Pricing
    • Assessments
    • Payroll
    • Blog
    • Sales
    • Salary Calculator

0

197
Views
Ajax recibe la respuesta como debería pero no se muestra en la página

Necesito averiguar algo con AJAX, express y Node.

  • mi solicitud de Ajax recibe datos y los registros sugieren que están ahí
  • no se muestran en la pagina

Aquí están las funciones: solicitud de Ajax:

 let openSingle = async function (par) { $.ajax({ url: targetEnvironment + '/v1/flashmsg/' + par, dataType: 'json', type: 'get', data: JSON.stringify(par), beforeSend: function (xhr) { xhr.setRequestHeader("x-access-token", localStorage.getItem('token')); }, contentType: 'application/json', success: function (data, textStatus, jQxhr) { console.log("Row <" + JSON.stringify(data)+ "> data retrieved successfully"); //shows ok $("#par").html("<b>displayed data is</b>" + JSON.stringify(data)); }, error: function (jqXhr, textStatus, errorThrown) { switch (jqXhr.status) { case 401: document.location.href = "/index.html"; break; } } }); };

HTML (problema en h5 -> línea 13)

 <div class="modal fade" id="parModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true"> <div class="modal-dialog" role="document"> <div class="modal-content"> <div class="modal-header"> <h5 class="modal-title" id="parTitle"></h5> <button type="button" class="close" data-dismiss="modal" aria-label="Close"> <span aria-hidden="true">&times;</span> </button> </div> <form role="form"> <div class="modal-body"> <h5 id=#par></h5> </div> <div class="modal-footer"> <button type="button" class="btn btn-secondary" data-dismiss="modal">Cancel</button> <button type="submit" class="btn btn-primary" id="saveAstreinteNum">Save</button> </div> </form> </div> </div> </div>
over 3 years ago · Santiago Trujillo
2 answers
Answer question

0

Cortesía de @MarkRobson: eliminar # en html ->

over 3 years ago · Santiago Trujillo Report

0

Parece que es solo un error tipográfico.

Tú tienes:

Debería ser:

over 3 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Our process Sales
Legal
Terms and conditions Privacy policy
© 2025 PeakU Inc. All Rights Reserved.

Andres GPT

Recommend me some offers
I have an error