无效参数 IE7 javascript 行号更改

发布于 2024-08-25 00:31:39 字数 1069 浏览 11 评论 0原文

这是测试页面:http://www.onebagoneearth.com/ OBOEKindBag(页面名称之间有空格和域,因为我不希望 URL 被如此索引)

如果您单击其中一个缩略图或主图像,您会看到一个弹出窗口,如果您输入数量,然后单击此处的“添加到购物车” ,在 IE7 中(至少在 Vista 上,也在 IE6 上,但我不太关注这一点),您会看到 Code:0 的无效参数错误。

该错误在 Chrome 4、IE 8 或 FF 3.5 中绝对不会发生。

编辑: 我仍然看到该错误,但找到了我的 Vista 上的 IE7 版本卡住的实际行。错误发生在第三方结帐/paypal Express javascript 的这一行(除非我想摆脱此功能,否则我无法控制它):

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

当我上钩时Visual Studio 启动,因此它针对 IE7 进行调试,它还显示此页面上发生错误:/app/site/backend/additemtocart.nl?c=659197&n=2&buyid=4751&qty=1&custcol_oboe_col_kind=2 (尽管 custcol_oboe_col_kind 设置的数字会根据所选的包颜色而变化)

该 URL 是添加到 iframe 的 src 属性(ID 为 cartFram)的内容,以便将商品(或多个商品)添加到购物车。

有关错误发生时间的详细信息: 当任何商品(或多个商品)添加到购物车时,就会发生这种情况;只是将商品添加到购物车后立即显示购物车时,我没有看到错误。例如,在此弹出界面中,重定向到购物车页面的操作被分离为“查看购物车”按钮,而如果您点击“关闭”按钮关闭弹出窗口,然后在此页面上点击“添加到购物车”,没有“查看购物车”按钮,并且您会立即重定向到购物车,因此您不会遇到错误,尽管我相信当我在代码中插入alert()语句时确实遇到了错误放慢速度。

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)

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

吝吻 2024-09-01 00:31:39

在将这些袋子之一添加到购物车或随后操作购物车总计时,我没有收到 JavaScript 错误。在FF3.5、IE6、7和8中测试。您修复了该错误吗?

顺便说一句,IE 在其 javascript 错误弹出窗口中报告的行号本质上是彻头彻尾的谎言。但是,如果您安装 Microsoft 脚本调试器(可用 此处),它可以捕获 JS 运行时错误并弹出打开真正发生错误的相应文件。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文