How to display table records in an HTML variable in a catalog item from the onload catalog script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
6 hours ago
I want to display the contents of a table filtering on a specific field in an HTML variable on a catalog item. I put the code I found in an onload script but can't seem to get it to work. Is there an out of the box server script include I can use? I assume TableDataLoader is an example of a custom server side script that needs to be created?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 hours ago - last edited 4 hours ago
@peterscaramuzzo If your catalog item variable is of type HTML then you simply need to use g_form.setValue('<name of the HTML variable>',tableHTML); to render the HTML in HTML variable. No need to use
document.getElementById('dvTable').innerHTML = tableHTML;