开发者

invalid argument IE7 javascript line number changes

This is the test page: http://www.onebagoneearth.com/ OBOEKindBag (spaces between the page name and domain because I don't want the URL indexed as such)开发者_StackOverflow中文版

If you click on one of the thumbnails, or on the main image, you see a popup window, and if you enter a quantity and then click "add to cart" here, in IE7 (at least on Vista, and also on IE6, but I'm not focusing on that as much), you see an invalid argument error with Code:0.

The error definitely doesn't occur in Chrome 4, IE 8, or FF 3.5.

Edit: I still see the error, but found the actual line that my version of IE7 on Vista chokes on. The error happens at this line of third party checkout/paypal express javascript ( and I have no control over it unless I want to get rid of this feature ):

document.getElementById('thirdPartyCheckoutButtons').style.paddingRight=newpos

When I hooked visual studio up so it debugs for IE7, it also showed that the error occurs on this page: /app/site/backend/additemtocart.nl?c=659197&n=2&buyid=4751&qty=1&custcol_oboe_col_kind=2 (although the number that custcol_oboe_col_kind is set to changes depending on the selected bag color)

That URL is what's added to an iframe’s src attribute with an ID of cartFram in order to add the item (or multiple items) to the shopping cart.

More info about when the error occurs: It happens when any item (or multiple items) are added to the cart; it’s just that I don’t see the error when the shopping cart is displayed immediately after the items are added to the cart. For example, in this popup interface, the action of redirecting to the cart page is separated out into a “view cart” button, whereas if you hit the “close” button to close the popup, and hit add to cart on this page, there isn’t a “view cart” button, and you’re immediately redirected to the shopping cart so you don’t hit the error, although I believe I did hit the error here when I inserted an alert() statement into my code to slow things down.


I'm not getting a javascript error on adding one of those bags to the cart, or manipulating the cart totals afterwards. Tested in FF3.5, IE6, 7, and 8. Have you fixed the error?

As an aside, the line numbers reported by IE in its javascript error popup are essentially outright lies. However, if you install the Microsoft script debugger (available here), it can catch JS runtime errors and pop open the appropriate file where the error really occured.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜