Discussions
Stay up-to-date with the latest news from NetSuite. You’ll be in the know about how to connect with peers and take your business to new heights at our virtual, in-person, on demand events, and much more.
Now is the time to ask your NetSuite-savvy friends and colleagues to join the NetSuite Support Community! Refer now! Click here to watch and learn more!
New AI Community Guidelines. Please review and follow them to ensure AI use stays safe, accurate, and compliant.
Stay in the Know
Be sure you're subscribed to NetSuite communication to stay in the know about monthly happenings, updates and announcements. Subscribe
Be sure you're subscribed to NetSuite communication to stay in the know about monthly happenings, updates and announcements. Subscribe
subtracting 2 prices in javascript
[CODE] var basPrc = "$5000";
var onlnPrc = "<%=getAttribute('item','382798','salesprice')%>";
//<%=getAttribute('item','382798','dontshowprice')%>
var CallForPrice = "<%=getAttribute('item','382798','dontshowprice')%>";
if (onlnPrc < basPrc && CallForPrice === "No") {
document.write('<span class="strike">Base Price: <span>'+basPrc+'</span></span>')
document.write("<br /><strong class=\"saleprice\">Our Price: <%=getAttribute('item','382798','salesprice')%></strong><br />");
//savings
var SaveO = onlnPrc.replace(/[^\d.-]/g, '');
var SaveB = basPrc.replace(/[^\d.-]/g, '');
document.write ('<span class="save">You Save: <span class="red">'+ Number(SaveB) - Number(SaveO) +'</span></span><br />');
var onlnPrc = "<%=getAttribute('item','382798','salesprice')%>";
//<%=getAttribute('item','382798','dontshowprice')%>
var CallForPrice = "<%=getAttribute('item','382798','dontshowprice')%>";
if (onlnPrc < basPrc && CallForPrice === "No") {
document.write('<span class="strike">Base Price: <span>'+basPrc+'</span></span>')
document.write("<br /><strong class=\"saleprice\">Our Price: <%=getAttribute('item','382798','salesprice')%></strong><br />");
//savings
var SaveO = onlnPrc.replace(/[^\d.-]/g, '');
var SaveB = basPrc.replace(/[^\d.-]/g, '');
document.write ('<span class="save">You Save: <span class="red">'+ Number(SaveB) - Number(SaveO) +'</span></span><br />');
0