internet-explorer-9

'data:image/jpg;base64' and jQuery image preview in Internet Explorer

五迷三道 提交于 2019-11-30 20:40:59
I get a Base64 encoded photo from a method. And I add it programmatically as a src of an image. Then I use a the jQuery lightBox plugin to show a preview of a image. In Firefox and Chrome everything works fine, but in Internet Explorer 9 as an image preview shows only a few lines of my image. So the image is not displayed as a whole; it's showing only a small percentage of it. The rest disappeared, and it looks like something stopped loading it at some moment. The Base64 is fine, in other web browsers the whole image appears, and there are only problems with Internet Explorer. In my aspx:

Count number of words in string using JavaScript

自闭症网瘾萝莉.ら 提交于 2019-11-30 19:40:37
I am trying to count the number of words in a given string using the following code: var t = document.getElementById('MSO_ContentTable').textContent; if (t == undefined) { var total = document.getElementById('MSO_ContentTable').innerText; } else { var total = document.getElementById('MSO_ContentTable').textContent; } countTotal = cword(total); function cword(w) { var count = 0; var words = w.split(" "); for (i = 0; i < words.length; i++) { // inner loop -- do the count if (words[i] != "") { count += 1; } } return (count); } In that code I am getting data from a div tag and sending it to the

Missing semi-colon in JavaScript causing “'foo' is undefined” error in IE9

旧城冷巷雨未停 提交于 2019-11-30 19:13:21
问题 I just spent about four hours tracking down this problem. I know what is causing it but don't know why and the "why" is bugging me. I have the following .js file: function funcA() { } function funcB() { do { } while (1 == 1) return 0 } I also have the following HTML page: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html> <head> <title></title> <script src="JScript1.js" type="text/javascript"></script> </head> <body

No Session Cookies on Internet Explorer 9 AJAX requests

无人久伴 提交于 2019-11-30 17:31:26
Internet Explorer 9 is not sending session cookies with my AJAX requests. When I issue an authentication request to my API via AJAX, it returns a response that sets a session cookie. Subsequent calls to the API via AJAX do not send the cookie back to the server. The API is located on the same host. Similarly, regular non-AJAX page requests also do not show the session cookie. I turned off all privacy and security settings in Internet Options. Chrome sends the cookies properly. How do I get IE to return the cookies? Thanks! The URL I was attempting to access used an underscore character ('_').

How do I get IE9 to use standards compliant mode when developing on localhost?

会有一股神秘感。 提交于 2019-11-30 17:27:45
According to MSDN, all I need to force standards compliant mode is to include the HTML 5 doctype: http://msdn.microsoft.com/en-us/library/gg699338%28v=vs.85%29.aspx And it works when the markup is served remotely. The problem is when I take identical markup and serve it up from an apache server running locally. IE9 defaults to quirks mode, and the compatibility view button goes away. I do a lot of development locally, and it defeats the purpose if I can only test my code in IE when it's served remotely. Thanks in advance. Try adding this: <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http

Overriding IE settings when embedding a WebBrowser control using IE9

我只是一个虾纸丫 提交于 2019-11-30 16:09:57
问题 I have an application (written in C++ with MFC, but I don't think that that's particularly relevant) that embeds the Internet Explorer ActiveX WebBrowser control for the purpose of showing some HTML pages. One requirement has always been to use the application's font name and size settings as the default settings for the HTML, rather than Internet Exporer's defaults. To achieve this, the application implements the IDocHostUIHandler2 COM interface, which it passes to the WebBrowser control.

Overriding IE settings when embedding a WebBrowser control using IE9

强颜欢笑 提交于 2019-11-30 15:55:14
I have an application (written in C++ with MFC, but I don't think that that's particularly relevant) that embeds the Internet Explorer ActiveX WebBrowser control for the purpose of showing some HTML pages. One requirement has always been to use the application's font name and size settings as the default settings for the HTML, rather than Internet Exporer's defaults. To achieve this, the application implements the IDocHostUIHandler2 COM interface, which it passes to the WebBrowser control. This causes the control to call the application's implementation of GetOptionKeyPath , which lets the

IE doesn't support relative paths in the base element when referencing CSS files

走远了吗. 提交于 2019-11-30 15:30:07
I have a site that uses a base tag to set an absolute path for relative URLs. It works fine in all the browsers I tested it in, except IE (big surprise). Based on the request that IE is making for the CSS file, it seems not to notice the base tag. It does acknowledge the base tag with everything else on the page. Why is this happening? Can anything be done about it, besides using an absolute path to reference the CSS file? Here is my code: <!DOCTYPE html> <html><head> <title>base test</title> <base href="/baseTest/"> <link rel="stylesheet" type="text/css" href="style.css"> </head> <body> <div

XDomainRequest aborts POST on IE 9

末鹿安然 提交于 2019-11-30 14:43:15
I am doing a cross domain Ajax call. My Code: if (window.XDomainRequest) // Check whether the browser supports XDR. { xdr = new XDomainRequest(); // Create a new XDR object. if (xdr) { xdr.timeout = 3000;//Set the timeout time to 3 second. xdr.onload = function () { alert("Success"); }; xdr.onerror = function () { alert("Error"); }; xdr.ontimeout = function () { alert("Error"); }; xdr.open("post", urlSearch); xdr.send(); } } else { $.ajax({ url: urlSearch, type: 'POST', dataType: 'json', timeout: 3000, success: function (data) { alert("Success"); }, error: function () { alert("Error"); } }); }

How to set the default value of a select box using JQuery in IE9?

跟風遠走 提交于 2019-11-30 13:02:17
I have the following select box. <select id="selId"> <option id='1' value='1'>1</option> <option id='2' value='2'>2</option> <option id='3' value='3'>3</option> <option id='4' value='4'>4</option> <option id='5' value='5'>5</option> </select> In jquery I am doing the following to select the value 2 in the select box.: ... $("select#selId").find("option#2").attr("selected", "selected"); ... The same code sets the value of 2 in the select box in IE8 and Firefox. But its not working in IE9. I am using JQuery 1.6.1 version DavidGouge Instead of setting the selected attribute, just use .val("2").