Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

239
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 4 years ago · Santiago Trujillo
2 answers
Answer question

0

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

over 4 years ago · Santiago Trujillo Report

0

Parece que es solo un error tipográfico.

Tú tienes:

Debería ser:

over 4 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 Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!