on[rel="delete"]', function () {
    // Row variable
    var tr = tblProducts.cell($(this).closest('td, li')).index();
    row_data = ( tblProducts.row(tr.row).data());
    product_id = row_data[0];
    product_name = row_data[2]
    new_delete_url  = 'delete/' + product_id;
    document.getElementById("updateThisText").innerHTML = "Are you sure you want to delete the product:  " + product_name + "?";
    document.getElementById("updateThisURL").href=new_delete_url;
    });


</script>
{% endblock javascrip