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

161
Vistas
I can't pull data from database because of $(this).data(temsilci_mail)

'I can't pull data from database because of $(this).data(temsilci_mail). I want to use email address as id'

  $(document).ready(function() {
            
                // Temsilci Listesi Modal
    
            $('.temsilcibilgi').click(function() {
                var userid = $(this).data('temsilci_mail');
                $.ajax({
                    url: 'ajax-modal/temsilci-listesi-modal.php',
                    type: 'post',
                    data: {
                        userid: userid
                    },
                    success: function(response) {
                        $('.modal-body').html(response);
                        $('#temsilcilistesimodal').modal('show');
                    }
                });
            });
    });
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

I suppose the $('.temsilcibilgi') selector return an array of button elements and you set up a temsilci_mail data to all of theses earlier. Because if you use $(this).data('temsilci_mail') you need to put the mail as a data before.

You can check if temsilci_mail data exist by logging button element like console.log($(this)) or by looking at the inspector and check that data-temsilci_mail attribute exist in each button.

If your problem is not that userid is undefined, then please give more precise information about your problem.

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