Hi,
My designer crashes when running a specific script.
This is my page content:
@InvoiceTable@
This is the script that crashes the designer
Name: Invoice Table
Find text: @InvoiceTable@
var table = loadhtml('Snippets/Fragments/invoice-table.html');
var tableRow;
var details = record.tables.item;
for(var i = 0, l = details.length; i < l; i++){
tableRow = query('tbody tr', table).clone();
query('tbody', table).append(tableRow);
}
results.html(table);
This is the content of the Snippet loaded in the script (‘Snippets/Fragments/invoice-table.html’):
<table id="table_items" class="table-grid" data-detail="item" style="width:100%;" title="item">
<thead>
<tr>
<td class="ItemNumber">ItemNumber</td>
<td class="ItemDescription">ItemDescription</td>
<td class="ItemUnitPrice">ItemUnitPrice</td>
<td class="ItemOrdered">ItemOrdered</td>
<td class="ItemShipped">ItemShipped</td>
<td class="ItemBackOrder">ItemBackOrder</td>
<td class="ItemTotal">ItemTotal</td>
</tr>
</thead>
<tbody>
<tr>
<td class="data ItemNumber">@ItemNumber@</td>
<td class="data ItemDescription">@ItemDescription@</td>
<td class="data ItemUnitPrice">@ItemUnitPrice@</td>
<td class="data ItemOrdered">@ItemOrdered@</td>
<td class="data ItemShipped">@ItemShipped@</td>
<td class="data ItemBackOrder">@ItemBackOrder@</td>
<td class="data ItemTotal">@ItemTotal@</td>
</tr>
</tbody>
</table>
Is there something wrong with my script? I got parts of it from the user guide located here: PlanetPress® Connect 1.3 User Guide - clone()
Kind Regards,
Sven Slijkoord