Why is Magento js / varien / form.js error in IE - js fiddle

This seems to be a problem that many people face! Google Search Results Link

There are many answers, I studied some of the most reasonable and fixed any errors on the page. In Chrome, I do not collect any errors, but in IE8 I get an invalid argument on line 205 of the error and there is no status state. I am not a javascript expert and do not know where to start fixing this problem. Especially when it comes to browser features.

Problem screenshot

If you look at line 205 in JS, then this field is missing:

if (this.regionSelectEl.options.add) {
        this.regionSelectEl.options.add(option);
} else {
        this.regionSelectEl.appendChild(option);
}

This is an element for selecting a region (state) that is not on the page. JS Link: http://jsfiddle.net/bms85/LKdsq/1/

What could be the reason for this?

Edit:

, html5. .

+3
4

, IE options.add:

            if (this.regionSelectEl.options.add) {
                this.regionSelectEl.options.add(option);
            } else {
                this.regionSelectEl.appendChild(option);
            }

appendClild.

            if (this.regionSelectEl.options.length > 0 && option.value.length > 0 && option.text.length > 0 && this.regionSelectEl.options.add) {
                //~ this.regionSelectEl.options.add(option);
                this.regionSelectEl.appendChild(option);
            } else {
                this.regionSelectEl.appendChild(option);
            }
0

Magento/Modernizr, . Modernizr 2.6.x, html5shiv 3.6, . , pre-2.6 modernizr, ( html5shiv) .

+3

,

this.regionSelectEl.options[this.regionSelectEl.options.length] = new Option(option.text, option.value);
+1

.js Magento Modernizr ( HTML5shiv ) IE8 (, - ). .

:

, HTML5shiv Modernizr, html5shiv.js : https://github.com/aFarkas/html5shiv

XML- , shiv IE8 :

<action method="addItem"><type>skin_js</type><name>js/html5shiv.js</name><params/><if>lte IE 8</if></action>

Modernizr . Modernizr script, script .

. IE8, , , .

+1
source

All Articles