cross-browser

Download file not working on internet explorer 6 (only for certain people)

霸气de小男生 提交于 2019-12-13 01:56:20
问题 I am working on an ASP.NET MVC3 webapplication. I have a button "Download" that downloads a file from the server. <input type="button" onclick="window.location.href='@Url.Action("DownloadFile", "Home")';" value="Download"/> In the HomeController I call the Action "DownloadFile" that returns the file return File(fileToReturn, Path.GetFileName(fileToReturn)); This is working normally on all browsers. however some people report that the download does not work on Internet Explorer 6. I installed

Alternative CSS font settings for different browsers?

痴心易碎 提交于 2019-12-13 01:48:53
问题 Just curious if there was a way to change font size on a website depending on the browser. I have an @font-face that works in Chrome and Safari, and then my alternative font choice is being used in Internet Explorer and Firefox. My alternative font choice renders larger than my preferred choice. Is there a way to change the font size for only IE and Firefox? Thanks! 回答1: You can detect the browser using JS and add a class to the HTML tag. You could use the following library for this: http:/

mousemove and cross-browser e.which

扶醉桌前 提交于 2019-12-13 00:48:33
问题 I need to know which mouse key is pressed on every mousemove event, and I try to use this: getMouseCode: function(e) { e = e || window.event; if (!e.which && e.button) { if (e.button & 1) e.which = 1; else if (e.button & 4) e.which = 2; else if (e.button & 2) e.which = 3; }; return e.which; }, But this is works only in chrome and IE7-8. IE9 debugger always says e.button == 0 and e.which == 1. After some debugging I figured out that window.event for IE9 contains right value of which, so I

IE8 failing to .append() jquery object

耗尽温柔 提交于 2019-12-13 00:42:46
问题 I wrote this function to make columns sortable. I want to rearrange divs based that are associated on a particular order number. It works fine in chrome and firefox, but for some reason in IE8 instead of, at the end of the function, appending all the rearranged content to a the #current_orders_content2 div, all of the content simply disappears. The function checks out in JSlint (via jsfiddle) and what's curious is that looking at all the values at the end (via IE console), everything looks

SVG being displayed differently on Chrome and Firefox

痴心易碎 提交于 2019-12-13 00:38:40
问题 I have one svg but it looks differently on Chrome and Firefox: http://codepen.io/anon/pen/OParwx. svg { fill: black; stroke: black; width: 40px; height: 40px; } <svg xmlns="http://www.w3.org/2000/svg" viewBox="0,0,48.266,51.827"> <g> <path d="M16.69 41.827c-2.763 0-4.975 2.237-4.975 5s2.212 5 4.975 5c2.763 0 5-2.237 5-5s-2.237-5-5-5"/> <path d="M40.19 41.827c-2.763 0-4.975 2.237-4.975 5s2.212 5 4.975 5c2.763 0 5-2.237 5-5s-2.237-5-5-5"/> <path d="M26.768 20v-20 20z" stroke-width="5" stroke

How to add non-enumerable property in JavaScript for IE8?

我只是一个虾纸丫 提交于 2019-12-12 22:41:09
问题 Is there a way to add "hidden" non-enumerable properties to a JavaScript object that works cross-browser? For most modern browsers, you can do: Object.defineProperty(obj, '__id__', { enumerable: false, value: id++ }); For some older non-IE browsers that don't have Object.defineProperty , you can use the __proto__ hack. None of those, however, work for IE. Is there a way to accomplish this in IE8 (would be cool if IE7 too, but not necessary)? The main goal is to be able to add tracker

AJAX Permission Denied On IE?

自作多情 提交于 2019-12-12 22:00:17
问题 I'm trying to make an ajax call to an external domain that is already allowing external requests by sending Access-Control-Allow-Origin:* header, but i get Permission Denied on the xmlhttp.post() line. Here is my code: var xmlhttp; try { xmlhttp = new ActiveXObject("Msxml2.XMLHTTP"); } catch (e) { try { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } catch (E) { xmlhttp = false; } } if (!xmlhttp && typeof XMLHttpRequest != 'undefined') { try { xmlhttp = new XMLHttpRequest(); } catch (e) {

Jquery text() compare to title in IE7

风流意气都作罢 提交于 2019-12-12 20:35:05
问题 In response to my last question here: Jquery to detect identical class and text for tab navi I have a got it succesfully working in all browsers except IE 7. IE 8,9 FF 5,6 Safari and Chrome all can implement my code correctly except ie7. Anyone suggestions? Fiddle http://jsfiddle.net/arkjoseph/3FrDY/ 回答1: DEMO $("ul.nav li").click(function() { var i = $(this).index(); $(".slideMove .slide").fadeOut("slow"); $('.slideMove .slide:eq('+i+')').fadeIn('slow'); }); I think you are complicating

Which Javascript solution(Not .htc) can really make Antialiased round corner in IE7 and 8?

醉酒当歌 提交于 2019-12-12 20:31:34
问题 Which JavaScript solution (Not .htc ) can really make Anti aliased round corner in IE7 and 8 like CSS3 gives in supported browsers? I tried many http://www.ruzee.com/blog/ruzeeborders/ http://blue-anvil.com/archives/anti-aliased-rounded-corners-with-jquery/ http://www.curvycorners.net/ All are claiming to give anti aliased corner but giving corners like this alt text http://shup.com/Shup/375652/11063104941-My-Desktop.png But no one is giving anti aliased corner. if I need 10px round corner.

Internet Explorer behavior as Mozilla Firefox or Chrome

岁酱吖の 提交于 2019-12-12 20:17:38
问题 Is there a solution to get Internet Explorer to behave as Firefox or Chrome? I am looking for a solution that would not use css hacks. I mean maybe some scripts to force change all behavior of IE. Thanks a lot! 回答1: You can have your users download and install Google Chrome Frame, then add this meta tag to your page head per the Chrome Frame developer guide: <meta http-equiv="X-UA-Compatible" content="chrome=1"> Of course, this requires user action. You can't control what browser your users