Error on IE 9 - 'SCRIPT600: Invalid target ele

2019-02-13 13:40发布

This particular page works on Firefox and Chrome. On IE9, I am getting this error: SCRIPT600: Invalid target element for this operation. I noticed this error message discussed in other posts as well but they deals with other problems.

Here is the code that throws the error. I am using trends charts (and highcharts for other tables) for my website.

<script>
jsio('import .js.trends');
new js.trends.Table({              // ERROR THROWN ON THIS LINE
target: 'trends_table',
type: 'credits',
noData: 'No credits yet!',
columns: [{
    title: 'Date',
    src: 'begin_date',
    format: 'date'
}, {
    title: 'Time',
    src: 'begin_date',
    format: 'time'
}, {
    title: 'Credits Earned',
    src: 'credits_earned',
    format: 'number'
}, {
    title: 'How Earned',
    src: 'activity',
    format: 'lookup',
    values: {
        0: 'ABC',
        1: 'DEF'
    }
}, {
    title: 'Credits Spent',
    src: 'credits_spent',
    format: 'number'
}]
}).refresh();
</script>

I am a little confused about the changes that I should make. Any suggestions?

Thanks in advance.

3条回答
欢心
2楼-- · 2019-02-13 14:07

As others have noted Internet Explorer has had issues setting the contents of <table>, <tr>,<td> etc. via .innerHTML, .insertAdjacentHTML has several bugs up until IE10 running specifically in Standards Mode.

Bug report and workarounds: http://webbugtrack.blogspot.ca/2007/12/bug-210-no-innerhtml-support-on-tables.html

查看更多
地球回转人心会变
3楼-- · 2019-02-13 14:17

I think IE has inconsistent support for the insertAdjacentHTML method, and for elements like TR and TBODY , IE will throw an exception if the method is called on those methods. This error exists since IE6.

查看更多
【Aperson】
4楼-- · 2019-02-13 14:20

If your element is a table, I believe it's one of those elements that are read-only with IE9.

查看更多
登录 后发表回答