I am working on a shopping cart on Netsuite coded with nested tables... I know it sucks.
Because I only have access to fields to customize the website I need a JS snippet to be able to load a specific CSS file for the shopping cart (to avoid styling the rest of the website)
I have never done that before, here is how I would start:
<script type="text/javascript">
var path = window.location.pathname;
if(path.indexOf('/Cart') !=-1 {
// load css file
}
</script>
What code would do that for me?
document.write('<link rel="stylesheet" type="text/css" href="style.css">');