List JS Plugin - Fetching Row Data in List with JOINs

bascherz

Member
Hey all,

I have a list that is the JOIN of 3 tables. Two of them are users and comprofiler (to get user profile info). I have a little JS that works perfectly on another list that does not have JOINs (just a single table) and it works perfectly. But for some reason, the same JS does not work on this list with JOINs. Here's the code:

Code:
var user = document.getElementById('user');
var useremail = user.getAttribute('email');
var emails = "mailto:"+useremail;
var delim = "?cc=";

jQuery.each(rows, function(rowid, row) {
   emails = emails + delim + row.mydbpfx_users___email;
   delim = ";";
});
emails += "&subject='testing'";
window.open(emails);

The goal here is to allow the user to select rows from the table to launch their local email client (e.g., Outlook). Again, this very same code works on another list that is comprised of a single table. This one joins three tables.

Seems like such a simple thing, but I have exhausted my brain trying to search for an answer here in the forums. Would appreciate anyone's help.

Thanks in advance,
Bruce
 
I'm an idiot. I remember why this worked in that other case. I had to embed the email address in a hidden field in the page text. I did not do that in this case, so the getAttribute is failing. Must not have slept well that night.
 
We are in need of some funding.
More details.

Thank you.

Staff online

Members online

Back
Top