PDA

View Full Version : IE on the Mac woes


SoCTech
29-Jan-2003, 11:38 AM
Hi all

On our pages, the "Items in Cart" and "Cart value" doesn't display in IE on the Mac :rolleyes:. It works in IE on the PC, and in Mozilla and Opera on both platforms. Any ideas on how to make this work? Or will I have to put a bit of code in to hide it if it's running on the errant browser?

I modified the code a touch (since we don't always want to display in the same currency) but it doesn't throw up any JS errors and like I said, it works everywhere else:

<script language="JavaScript">
var valItems = getCartItem(1);
valItems = valItems.toString().substr(5); // Strip off the &#xxx; (dollar sign)
document.write("Items&nbsp;in&nbsp;cart:&nbsp;" + getCartItem(3)+"&nbsp; "); // "Items in cart" was:NETQUOTEVAR:CARTCOOKIEITEMS
document.write("Cart&nbsp;value:&nbsp;&pound;" + valItems); // "Cart value" was: NETQUOTEVAR:CARTCOOKIEVALUE
</script>

Cheers

mcottam
29-Jan-2003, 02:14 PM
In Act_Primary.html have you put:
<SCRIPT LANGUAGE="JavaScript" SRC="actinicextras.js" TYPE="text/javascript"></SCRIPT>
in the head portion?

It should be below:
<SCRIPT LANGUAGE="JavaScript" SRC="actiniccore.js" TYPE="text/javascript"></SCRIPT>

SoCTech
29-Jan-2003, 03:04 PM
Yes I have both of these lines in the <head> section. It works on all other platforms/browsers except IE on the Mac...

NormanRouxel
29-Jan-2003, 03:51 PM
Maybe it's the toString() method. I've seen problems with it not obeying the optional radix parameter on some browsers.

This is another method of converting a number to a string.

var valItems = getCartItem(1) + "";
valItems = valItems.substr(5); // Strip off the &#xxx; (dollar sign)

Norman.