Magento News
Javascript: Don’t Use ‘length’ and ‘width’ as Variables
I have been working on a Magento customization that calculates rug pricing by square foot. I’ve had to write a good amount of javascript to help with this, and I had everything working just fine in Firefox, Safari, and Chrome. But (surprise, surprise) IE was throwing errors. After some console logging and debugging, I finally figured out that if I changed my variable names in a function I had from ‘length’ and ‘width’ to ‘rugLengh’ and ‘rugWidth’, then IE stopped complaining and everything worked just fine.
I’m not much of a javascript programmer, though I can get by. This particular issue is still a mystery to me. If any of you know why this was happening, I’d love to know!
Javascript: Don’t Use ‘length’ and ‘width’ as Variables
Possibly Related Posts:
- Database query different results
- Menu highlight in magento under admin
- magento disable a banner on certain category pages or have a banner with multiple links
- Magento, using ACL for frontend. Possible?
- Magento IE-7 Fix In Windows XP
RSS Feed