var script_tag = document.getElementById('prodGroups'); var query = script_tag.src.replace(/^[^\?]+\??/,''); // Parse the querystring into arguments and parameters var vars = query.split("&"); var args = {}; for (var i=0; i
${products[i].Title}
${products[i].Strap}
${products[i].SP1}

${products[i].SP2}

${products[i].SP3}
`; // Append each product div to the row rowDiv.appendChild(productDiv); } // Append the row to the product list container productListDiv.appendChild(rowDiv); } // Initial display of all products after DOM has loaded document.addEventListener('DOMContentLoaded', function() { fetchData(); });