And given that you are getting the Cart.Total from server-side code, why wouldn't you do that calculation and the display of the message from server-side code???

Anyway, I don't see anything in there that would prevent it from working with IE.

I see a mistake that would affect *ALL* browsers, though. You are comparing a string (price) to a number (freeprice) and depending on what is in price that might not work at all.

In place of this line:

price = price.replace(/^\$|,/g, '');

try this:

price = Number( price.replace(/[^\d\.]/g, '') );

hlcno

06-24-2012, 03:51 AM

First off thanks so much for taking the time to look at this.

It's crappy network solutions ecommerce platform. <%Cart.Total%> is there markup you throw anywhere to render the current cart total. So you can insert it somewhere you need.. in this case this javascript.

I did what you said and changed that line but it's still not showing up in IE 9 when in computability mode.

So that's why I believe it's something to do with document.write or something else where IE8 or lower doesn't know what to do with it and doesn't render the line of code.

You can test this local by replacing the markups with any number just as a test.

Again thanks so much for taking your time. I really appreciate it. It's been something I've been trying to figure out for awhile and it just seems stupid.