Jquery push data to the good row.
- by marharépa
Hi!
This is my big problem. This script put the information to a table.
function handleAccountFeed(result) {
var entries = result.feed.getEntries();
var outputTable = ['<table><tr>',
'<th>Account Name</th>',
'<th>Profile Name</th>',
'<th>Profile ID</th>',
'<th>Table Id</th></tr>'];
for (var i = 0, entry; entry = entries[i]; ++i) {
var row = [
entry.getPropertyValue('ga:AccountName'),
entry.getTitle().getText(),
entry.getPropertyValue('ga:ProfileId'),
entry.getTableId().getValue()
].join('</td><td>');
outputTable.push('<tr><td>', row, '</td></tr>');
}
outputTable.push('</table>');
document.getElementById('outputDiv').innerHTML =
outputTable.join('');
}
I've got an own SMARTY template, which makes a table:
<table id="stuffs">
<tbody>
{section name=i loop=$ownsites}
<tr><td>{$ownsites[i].id}</td><td>{$ownsites[i].domain}</td><td>PLACE</td></tr>
{/section}
<tbody>
</table>
I'd like to put the TableId (getTableId().getValue()) to that row's PLACE where {$ownsites[i].domain} is equal to the jquery row's Title (getTitle().getText())
How can i do this within this jQuery script?