最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - Error on IE 9 - 'SCRIPT600: Invalid target element for this operation - Stack Overflow

programmeradmin3浏览0评论

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.

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.

Share Improve this question edited Jan 7, 2012 at 18:41 Navneet asked Jan 7, 2012 at 17:15 NavneetNavneet 9,84811 gold badges37 silver badges52 bronze badges 6
  • Missing quote at values: {0: 'ABC (at the end), and too much mas at the end (1: 'DEF',). If you fix these issues, does the problem disappear? – Rob W Commented Jan 7, 2012 at 17:21
  • No, that was a typo in creating a simpler module. I took out a large message and put in ABC. Sorry about that. Correcting the mistake. – Navneet Commented Jan 7, 2012 at 18:39
  • 1 answer for this meta question meta.stackexchange./questions/98269/inline-editing-problems + ment on msdn msdn.microsoft./en-us/library/ms536452(v=vs.85).aspx , lead to me to think that you should not make Table in the way you are trying to create it with this unknown ugly framework. – c69 Commented Jan 7, 2012 at 19:16
  • Its hard to tell, most questions on this error here are about IE and tbody. – Andreas Köberle Commented Jan 7, 2012 at 19:17
  • 1 How do we know it's not an issue with the library you're using? You should try reproducing this without any libraries. – AshleysBrain Commented Jan 15, 2012 at 12:11
 |  Show 1 more ment

3 Answers 3

Reset to default 7

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.

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

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

发布评论

评论列表(0)

  1. 暂无评论