internet-explorer-11

Why Image 'complete' property always return true even if there is no src tag?

浪尽此生 提交于 2019-12-10 14:59:57
问题 I just write document.createElement("img").complete;//To check whether image is loaded or not In Firefox,it returns true. In IE,it return false OR In a html page just create one image as: <!-- IMG tag with no SRC attribute. --> <img id="noSrcImg" /> and In js check the complete property value : var img = document.getElementById("noSrcImg"); img.complete true for FF and false for IE Can any one explain why this inconsistent behavior? Is there any other better way to check whether image is

javascript frame navigation in ie11 with a pdf

夙愿已清 提交于 2019-12-10 14:58:24
问题 I have a simple web page where 1 frame displays a pdf and another a menu bar. <iframe src="bar.html" name="menu" ></iframe> <iframe src="doc.pdf" name="itempane" ></iframe> Using chrome I can navigate from the menu bar to the parent and back down to the frame containing the pdf in order to print it var pWindow = window.parent; pWindow['itempane'].print(); Attempting to do the same in IE11 gives an Invalid calling object error. you can see this at http://www.abhrdev.co.uk/main.html What am I

jQuery .html() function doesnt work in IE 11

故事扮演 提交于 2019-12-10 14:15:40
问题 In my .net MVC3 web application i have an ajax call that returns some html code. I pass this html into a div like so: $.ajax({ url: 'controller/action', data: {id: id,}, type: 'GET', async: false, success: function (data) { $("#container").html(data); }, }); This works fine in all browsers except ie 11. What happens is that the html doesnt render in #container div unless i click somewhere on the page. How can i get the html to render without clicking anywhere in ie11? thanks 回答1: A likely

JavaScript in IE11 giving me script error 1003

时间秒杀一切 提交于 2019-12-10 14:00:55
问题 I have a site with an accordion and some javascript. In Firefox everything is working as it should, but in IE11 I get the error SCRIPT1003: Expected ':' I narrowed it down to this piece of code in my .js file: var nmArray = new Array(); function saveplayers() { var x; for (x=0;x<32;x++) { var y = "i"+eval(x+1); nmArray[x]=document.getElementById(y).value; } var request = $.ajax({ type: "POST", url: "savep.php", data: ({ nmArray }), cache: false }); } The error complains there should be a

IE 11 Script1002 Filter syntax error

╄→尐↘猪︶ㄣ 提交于 2019-12-10 13:45:56
问题 Hi there I get a error message in ie11 but not in chrome the error is Script1002 Syntax error My code is as follows vm.NoOftroopMemEditReq = (vm.EventAttendees.TicketAttendees.filter(a => a.Attendees.some(Attendee => Attendee.IsEditRequired === true))).length; 回答1: in IE 11 this symbol => don't work, replace => with === vm.NoOftroopMemEditReq = (vm.EventAttendees.TicketAttendees.filter(function (a) { return a.Attendees.some(Attendee === Attendee.IsEditRequired === true); })).length; 来源: https

Date.parse failing in IE 11 with NaN

安稳与你 提交于 2019-12-10 13:42:06
问题 When i try to parse a date in IE 11 , its throwing me NaN, but in chrome/firefox i get the below timestamp 1494559800000 Date.parse("‎5‎/‎12‎/‎2017 09:00 AM") Below is the condition which is failing for me in IE 11. Is there any other library or way i can fix this in IE 11. tArray contains ["09:00 AM", "05:00 PM"]; var tArray = timings.toUpperCase().split('-'); var timeString1 = currentDate.toLocaleDateString() + " " + tArray[0]; var timeString2 = currentDate.toLocaleDateString() + " " +

Remove border from object element in IE11

十年热恋 提交于 2019-12-10 12:56:56
问题 I can't remove inset borders from object elements in IE11. They don't appear in any other browser or version of IE as far as I can tell. See the attached screenshot. Setting border as an attribute or inline style doesn't work... any ideas? 回答1: Add border-style: none; to your css for that div. 来源: https://stackoverflow.com/questions/29478728/remove-border-from-object-element-in-ie11

geoLocation.GetCurrentPosition always fails in IE 11

无人久伴 提交于 2019-12-10 12:41:39
问题 The script below works fine in FireFox and Chrome, but in Internet Explorer 11, it always fails (with POSITION_UNAVAILABLE). I have set the browser to allow requests for position, and I agree to the prompt the browser presents me when requesting permission. I'm almost certain that this worked fine a few months ago when I was last experimenting with it. What could I be missing as far as IE's settings? <script type="text/javascript"> $(document).ready(function () { if (Modernizr.geolocation) {

SetTimeout() won't execute the function

a 夏天 提交于 2019-12-10 10:52:51
问题 So this is my code snippet: 'in VBScript Sub Main() Dim timeoutTimer 'more scripts here 'more scripts here 'more scripts here timeoutTimer = window.setTimeout("alert()", 2000) Call WaitForAnEvent() 'This function waits for an event to happen 'if there is no event then code execution stop's 'and wait 'more scripts here 'more scripts here 'more scripts here End Sub Sub alert() MsgBox "Help!" End Sub What happens is, there are times when alert() is not triggered, and I don't have any idea why. I

Preventing high-contrast mode in Edge from adding background to text

馋奶兔 提交于 2019-12-10 10:51:41
问题 I'm working to adjust some components so that they all function and look good in high-contrast mode. Edge seems to be adding a black background under all text that IE11 does not add. I can't seem to find a way to target this background in CSS, or any other way to normalize the behavior between the two browsers. For example, let's say I have the following: <div class="SelectedText"> Text! </div> And let's say I assigned background-color: cyan; and color: black; to the .SelectedText div. In