Twitter widget stops page from rendering in IE 8, does anyone know why?

The widget works fine in Firefox, but completely stops displaying the page in IE8.

This is the error report he gives me:

Webpage Error Details

User Agent: Mozilla / 4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident / 4.0; Media Center PC 3.0; .NET CLR 1.0.3705; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0 .04506.30; .NET CLR 3.0.04506.648; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729) Timestamp: Fri, Apr 23, 2010 8:12:25 PM UTC

Message: 'Document.getElementsByTagName (...). 0 'null or not an object Line: 9 Char: 8365 Code: 0 URI: http://widgets.twimg.com/j/2/widget.js

Does anyone help?

+3
source share
4 answers

The problem is one error, which is easily fixed by the reported (horror!) Mail site .

Caution: you need to download and place the “widget.js” file yourself to do this (26.7k), but on the sunny side you can make minor changes to the widget that the original Twitter page does not support.

This worked for me in IE8. I got "Object does not support this property or method." Error js.

+3
source

Solution to the problem:

<script type="text/javascript" src="2.js"></script>
<body>
<script type="text/javascript">
 new TWTR.Widget({
  version: 2,
  type: 'search',
  search: 'hakarito',
  interval: 6000,
  title: 'what people say about...',
  subject: 'Botball Online',
  width: 250,
  height: 300,
  theme: {
    shell: {
       background: '#007CC2',
       color: '#FFFFFF'
    },
    tweets: {
      background: '#000000',
      color: '#ffffff',
      links: '#f59f00'
    }
  },
  features: {
    scrollbar: false,
    loop: true,
    live: true,
    hashtags: true,
    timestamp: true,
    avatars: true,
    toptweets: true,
    behavior: 'default'
  }
}).render().start();
</script> 
</body>

The solution is that your script should be within <body>

+4

http://www.webdeveloper.com/forum/showthread.php?t=224530

defer = "defer" script, widget.js, , . , , .

<script defer="defer" src="http://widgets.twimg.com/j/2/widget.js" type="text/javascript"></script>
+2

Twitter Microsoft Internet Explorer 8. , . FireFox , IE. , , - widget.js Twitter, , .

.js , Twitter, , IE . . .js, :

http://widgets.twimg.com/j/2/widget.js

.js, . , , , "" "", , :

"Array.forEach" widget.js, "Array.prototype.forEach"

By adding the word "prototype", you have now corrected your mistake. Of course, you can’t upload the file to your server, so just put it in a directory on your site and specify the path to it directly by changing the path in your generated Twitter source to point to the new .js files on your site.

Hope this helps! Have a nice day! Brian J. www.EnjoyTheCove.com

+1
source

Source: https://habr.com/ru/post/1742528/


All Articles