English 中文(简体)
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)

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.





相关问题
selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

How to fire event handlers on the link using javascript

I would like to click a link in my page using javascript. I would like to Fire event handlers on the link without navigating. How can this be done? This has to work both in firefox and Internet ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Clipboard access using Javascript - sans Flash?

Is there a reliable way to access the client machine s clipboard using Javascript? I continue to run into permissions issues when attempting to do this. How does Google Docs do this? Do they use ...

javascript debugging question

I have a large javascript which I didn t write but I need to use it and I m slowely going trough it trying to figure out what does it do and how, I m using alert to print out what it does but now I ...

Parsing date like twitter

I ve made a little forum and I want parse the date on newest posts like twitter, you know "posted 40 minutes ago ","posted 1 hour ago"... What s the best way ? Thanx.

热门标签