Script438: Object Doesn't Support Property or Method Ie

SCRIPT438: Object doesn't support property or method IE

After some days searching the Internet I found that this error usually occurs when an html element id has the same id as some variable in the javascript function. After changing the name of one of them my code was working fine.

IE Console Error: SCRIPT438: Object doesn't support property or method 'from'

also the Set methods dont have a full support in ie so u have 2 solution :

1: just use the array methods compatible with all navigators : for exemple you can use this code :

Array.prototype.unique = function () {
return this.reduce(function (acc, el) {
return acc.indexOf(el) === -1 ? acc.concat(el) : acc;
}, []);
};

2: add polyfill file to project you can find exemple of array.from polyfill here:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/from

SCRIPT438: Object doesn't support property or method 'values'

The error is occurring because, Object.values() is not supported in Internet Explorer.

see browser compatibility for Object.values()

Here is a workaround, that you could use instead ...

data: Object.keys(activeOrdered).map(function(key) {return activeOrdered[key];})

and ...

data: Object.keys(inactiveOrdered).map(function(key) {return inactiveOrdered[key];})

Object doesn't support property or method 'remove'

remove() as a method on HTMLElements unfortunately is not supported by Internet Explorer.

You could use the workaround in this SO answer for a vanilla javascript solution.

However as you already seem to use jQuery, instead replace

document.getElementById('tab-' + x).remove();

with

$('#tab-' + x).remove();

JS IE Error (Object doesn't support property or method 'select')

You need to create an object of the element by accessing the element using its ID or name.

Example:

<!DOCTYPE html><html><head><meta name="viewport" content="width=device-width, initial-scale=1">
</head><body>
<p>Try to paste the text by pressing ctrl + v in a different window, to see the effect.</p>

<textarea name="wtBodyInpt" id="wtBodyInpt">Copy This Text</textarea>
<p>The document.execCommand() method is not supported in IE8 and earlier.</p>
<script>function copyBodyToClipboard (element) { var copyText = document.getElementById(element); copyText.select(); copyText.setSelectionRange(0, 99999); document.execCommand("copy"); }var str="wtBodyInpt";copyBodyToClipboard (str)
</script>
</body></html>

SCRIPT438: Object doesn't support property or method 'endsWith' in IE10

Implemented endsWith as below

String.prototype.endsWith = function(pattern) {
var d = this.length - pattern.length;
return d >= 0 && this.lastIndexOf(pattern) === d;
};

IE 11: Object doesn't support property or method 'getElementsByClassName'

The fix is as follows:

<meta http-equiv="X-UA-Compatible" content="IE=11" />


Related Topics



Leave a reply



Submit