We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Getting values from each table data cell in the current table row...

Hi All,
I am new to this forum. I'm looking for some suggestions on how to solve my problem.
Here is my problem, i'm trying to display my data from MySql database using PHP, which is working well. My dilemma is that once displayed, i want to click a button in each table row, and get the value of the first column, which is company name. So, far i'm getting all the data fields, but i can't seem to get only the first column value of that table row cell data and display it in an alert message box. Eventually, i want to return the value and send it to Mysql using PHP to check it for validation against the company name on my database.
Thank you in advance...
//PHP data from MySQL:
$.getJSON("BNS_load_automobile_data.php", function(data) {
$.each(data, function(index, data) {
//$('#automobile_body_content').append('');
$('#automobile_body_content').append('
');
//$('#automobile_body_content').append('
');
$('#automobile_body_content').append('
');
//$('#automobile_body_content').append('
');
$('#automobile_body_content').append('
');
$('#automobile_body_content').append('
');
$('#automobile_body_content').append('
');
$('#automobile_body_content').append('
');
$('#automobile_body_content').append('
');
$('#automobile_body_content').append('
');
$('#automobile_body_content').append('
');
$('#automobile_body_content').append('
');
$('#automobile_body_content').append('
');
$('#automobile_body_content').append('
');
$('#automobile_body_content').append('
');
//$('#automobile_body_content').append('
'+data.c_logoContent+''+data.c_name+''+data.c_url+''+data.c_email+''+data.c_phonenum+''+data.c_faxnum+''+data.c_address+''+data.c_city+''+data.c_state+''+data.c_zipcode+''+data.c_country+'
');
});
});
//------------------------------------------------------------------------------
//JQuery button click code:
$(".coupon_button").on("click", function() {
var allData = document.getElementById("automobile_body_content").innerText;
var col1Info = allData;
alert(col1Info);
});
//------------------------------------------------------------------------------
//HTML Layout:

Automobile Businesses

CompanyEmailPhone#Fax#AddressCityStateZipcodeCountryHiringCoupons

1 Reply

JA Jesus Arockia Sankaran S Syncfusion Team June 6, 2019 01:14 PM UTC

Hi Mike Burgos, 

We have checked your reported issue and this is not related to our components. However, we suggested you for this requirements. Please find the below link. 




We hope this might be useful to requirements. 
 
Regards, 
Jesus Arockia Sankaran S 


Loader.
Live Chat Icon For mobile
Up arrow icon