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

156
Views
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 answers
Answer question

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 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!