internet-explorer-8

getElementsByClassName & IE8: Object doesn't support this property or method [duplicate]

点点圈 提交于 2019-12-17 06:39:08
问题 This question already has answers here : javascript document.getElementsByClassName compatibility with IE (7 answers) Closed 5 years ago . I know " getElementsByClassName " is not support by IE8 . Do you know what can I use instead? I am getting annoying by error "Object doesn't support this property or method". The HTML code is: function sumar() { var elems = document.getElementsByClassName('verdana14 toAdd'); var myLength = elems.length; total = 0; for (var i = 0; i < myLength; ++i) { if

How to set HTML content into an iframe

时光总嘲笑我的痴心妄想 提交于 2019-12-17 06:36:29
问题 I have a HTML string <html> <body>Hello world</body> </html> and I want to set it to an iframe with JavaScript. I am trying to set the HTML like this: contentWindow.document.body.innerHTML or contentDocument.body.innerHTML or document.body.innerHTML but IE gives "Access is denied." or "Object does not support this property or method." or "Invalid final element to the action." errors. Here is my full code: <!DOCTYPE html> <html> <head> <script type="text/javascript" src="jquery_1.7.0.min.js"/>

contenteditable=false inside contenteditable=true block is still editable in IE8

不羁岁月 提交于 2019-12-17 06:12:31
问题 I have the following HTML intending to make sure that the inner span isn't editable. This works in other browsers but not IE8. <div contenteditable="true"> Luke, I am your father. <span contenteditable="false">I'm your son?! Ewww!</span> Don't speak back to me! </div> Here's a JSFiddle to illustrate the point (use IE8 to test it): http://jsfiddle.net/haxhia/uUKPA/3/ . How do I make sure that IE8 treats this properly as well? 回答1: Okay, I already have discovered the answer much like how

contenteditable=false inside contenteditable=true block is still editable in IE8

▼魔方 西西 提交于 2019-12-17 06:12:05
问题 I have the following HTML intending to make sure that the inner span isn't editable. This works in other browsers but not IE8. <div contenteditable="true"> Luke, I am your father. <span contenteditable="false">I'm your son?! Ewww!</span> Don't speak back to me! </div> Here's a JSFiddle to illustrate the point (use IE8 to test it): http://jsfiddle.net/haxhia/uUKPA/3/ . How do I make sure that IE8 treats this properly as well? 回答1: Okay, I already have discovered the answer much like how

Conditional comment for 'Except IE8'?

折月煮酒 提交于 2019-12-17 05:13:09
问题 I'm using <!--[if IE 8]><![endif]--> for targeting IE8, but there's some JS that I want to load for all browsers EXCEPT IE8, what conditional comment should I use? Edit: I wonder if this would work: <!--[if lte IE 8]><![endif]--> Thanks 回答1: I can think of a trick. Set a variable inside the IE conditional tag and include your JS code if that variable isn't set. <script> var ie8 = false; </script> <!--[if IE 8]> <script> ie8 = true; </script> <![endif]--> <script> if (ie8 == false) { // any

Why does a filter gradient on a pseudo element not work in IE8?

余生颓废 提交于 2019-12-17 05:01:22
问题 I want to create buttons like these: In modern browsers the effect is created using inset box-shadow and filters. For IE8 - pseudo-elements are chosen. For IE7 - I use special tags wrapped in conditional comments. Demo: (http://jsfiddle.net/8M5Tt/68/) /** * Button w/o images */ html { font-size: 62.5%; } body { font: normal 1em/1em Arial, Tahoma, Verdana, sans-serif; } /* layout */ .btn { display: inline-block; height: 28px; border-width: 1px; border-style: solid; width: 170px; box-sizing:

Force IE8 Into IE7 Compatiblity Mode

你离开我真会死。 提交于 2019-12-17 04:23:07
问题 Is there a way to force IE8 into IE7 compatibility mode using .NET or Javascript? 回答1: If you add this to your meta tags: <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" /> IE8 will render the page like IE7. 回答2: You can do it in the web.config <httpProtocol> <customHeaders> <add name="X-UA-Compatible" value="IE=7"/> </customHeaders> </httpProtocol> I have better results with this over the above solutions. Not sure why this wasn't given as a solution. :) 回答3: I might have found it

Force IE8 Into IE7 Compatiblity Mode

旧巷老猫 提交于 2019-12-17 04:22:12
问题 Is there a way to force IE8 into IE7 compatibility mode using .NET or Javascript? 回答1: If you add this to your meta tags: <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" /> IE8 will render the page like IE7. 回答2: You can do it in the web.config <httpProtocol> <customHeaders> <add name="X-UA-Compatible" value="IE=7"/> </customHeaders> </httpProtocol> I have better results with this over the above solutions. Not sure why this wasn't given as a solution. :) 回答3: I might have found it

jQuery issue in Internet Explorer 8

青春壹個敷衍的年華 提交于 2019-12-17 04:12:53
问题 I am trying to get my jQuery functions to work on IE8. I am loading the library from Google's servers (http://ajax.googleapis.com/ajax/libs/jquery/1.3/jquery.min.js). The $(function(){}) is never called. Instead, I get an error Object expected . I opened the developer and ran typeof $ in the console, and it came up as undefined . I have tried going to other sites that I know use jQuery (jquery.com), and those all work, is there something I might be missing here? 回答1: Write "var" before

Can't display PDF from HTTPS in IE 8 (on 64-bit Vista)

↘锁芯ラ 提交于 2019-12-17 03:56:22
问题 I have a home-grown HTTPS server that serves up simple files (it's embedded within my app). It works great -- been using it forever. Recently added SSL support -- Chrome, FireFox and IE all like it and load pages just fine. The problem I find is when I try to load a PDF file over the HTTPS connection. For some reason, the PDF never displays in IE 8 (64-bit on 64-bit Vista). It works fine in Chrome. And it works fine in IE 8 when using plain HTTP -- only fails when using HTTPS. NOTE: When IE 8