Need a little help with this please
Need a little help with this please
Trying to get this email button to work but getting an error.
https://datatables.net/forums/discussion/21982/is-there-a-way-to-email-a-datatable
I'm new to all this and I'm guessing it's something to do with this
var pid = $("#elempid").val();
To what does that refer?
And where should I put that reference. The sendmail is triggering fine. My code is same except table reference.
Console output below.
<table>
<thead>
<tr role=\"row\"><th class=\"sorting\" tabindex=\"0\" aria-controls=\"pexpenses\" rowspan=\"1\" colspan=\"1\" aria-label=\"Type: activate to sort column ascending\" style=\"width: 235px;\">Type</th><th class=\"sorting_asc\" tabindex=\"0\" aria-controls=\"pexpenses\" rowspan=\"1\" colspan=\"1\" aria-label=\"Description: activate to sort column ascending\" style=\"width: 425px;\" aria-sort=\"ascending\">Description</th><th class=\"sorting\" tabindex=\"0\" aria-controls=\"pexpenses\" rowspan=\"1\" colspan=\"1\" aria-label=\"Cost: activate to sort column ascending\" style=\"width: 152px;\">Cost</th><th class=\"sorting\" tabindex=\"0\" aria-controls=\"pexpenses\" rowspan=\"1\" colspan=\"1\" aria-label=\"Quantity: activate to sort column ascending\" style=\"width: 239px;\">Quantity</th><th class=\"sorting\" tabindex=\"0\" aria-controls=\"pexpenses\" rowspan=\"1\" colspan=\"1\" aria-label=\"Item Total: activate to sort column ascending\" style=\"width: 274px;\">Item Total</th></tr>
<thead>
Edited by Colin - Syntax highlighting. Details on how to highlight code using markdown can be found in this guide.
Answers
There would be an
input
element on that page, and that's just getting the value of it.We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.
Cheers,
Colin
Thank You Colin! Completely stuck with this!
http://live.datatables.net/nafahopu/1/edit
You don't have a variable called "table". Your DataTable object is not assigned to any variable.
Yes thank you, but that is for the drill down I'm trying to implement.
var data = table.row( this ).data();
nothing to do with the email.
Please describe what you are expecting to happen. Your post form data looks like this:
Please lot us know what you want sent.
Kevin
I am trying to send an email with the datatable data in it. I'm using the sendmail function. It is dropping into This
alert("Email Error! Please check browser console by pressing CTRL + SHIFT + I !");
So you are saying that the
if(data == "okay"){
statement is false so the alert massage is displayed in the below code:This is not a Datatables issue. You will need to debug the
sendmail.php
script to find out what is happening and whydata
does not equalokay
.Kevin