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

168
Vistas
Pase el parámetro al modal "Mostrar detalles" en la tabla

Creé la siguiente tabla dinámica, qué filas se crean para cada registro que se encuentra en la base de datos.

 $(document).ready(function () { var $form = $('#my-form'); $form.submit(function () { $.post($(this).attr('action'), $(this).serialize(), function (response) { let table = '<table> <thead> <tr> <th>Candidate Name</th> <th>Candidate Surname</th> <th>Interview Type</th> <th>Interview Date</th> <th>Interviewer</th> <th>Feedback</th> </tr> </thead><tbody>'; response.forEach(function (d) { table += '<tr><td>' + d.candidateName + '</td>'; table += '<td>' + d.candidateSurname + '</td>'; if (d.interviewType === 1) { table += '<td>MOTIVAZIONALE</td>'; } else if (d.interviewType === 2) { table += '<td>TECNICO</td>'; } else { table += '<td></td>'; } if (d.scheduledDate === null) { table += '<td></td>'; } else { table += '<td>' + d.scheduledDate + '</td>'; } table += '<td>' + d.enterpriseId + '</td>'; if (d.finalFeedback === null) { table += '<td><button type="button" onclick="sendValue(d.idColloquio)">Add a feedback</button></td></tr>'; }else{ table+= '<td>OK</td></tr>'; } }) table += '</tbody>'; $('#mytable').empty().html(table); }, 'json'); return false; }); });

En cada fila hay un botón que se usa para insertar un comentario: este botón tiene que redirigir a otra página pasando la identificación como parámetro de solicitud, pero la función "onClick" no funciona. En el evento del inspector de Chrome en generado.

EnviarValor:

 function sendValue(id) { window.location.href="insertMotivationFeedback?idColloquio="+id; }

¿Alguien puede ayudarme?

Gracias

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Tienes que pasar la url completa:

window.location.href="https://example.com/insertMotivationFeedback?idColloquio="+id;

about 4 years ago · Juan Pablo Isaza Denunciar
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