Tag: internet explorer

does IE not pass url params to a js script?

I have searched here and google for this. Found some other interesting stuff, but nothing specifically relevant. Scenario: —-html page—- … <script src=”/scripts/jsFile.php?v=246″ type=”text/javascript”></script> … —-jsFile.php—- <?php $v=(int)$_GET[‘v’]; if (!$v) { echo “no version”; } ?> All browsers pass the “v” parameter to the script except for IE 8, specifically: Mozilla/4.0 (compatible; MSIE 8.0; Windows […]

IE lies about borderWidth?! How to get actual value?

By default, many of you know, IE has a 2px border around the body tag. IE considers this border as outside of the regular page. Basically, this means that the document origin is actually at [borderLeftWidth, borderTopWidth]. This poses problems when doing calculations in JavaScript that require both clientXY and screenXY. Since there is a […]

IE8 AJAX GET setRequestHeaders not working unless params provided in URL

I’m trying to create an AJAX request in IE8. var xhr = new ActiveXObject( ‘Msxml2.XMLHTTP’ ); xhr.open( ‘GET’, ‘/ajax/’ ); // Required header for Django to detect AJAX request xhr.setRequestHeader( ‘X-Requested-With’, ‘XMLHttpRequest’ ); xhr.onreadystatechange = function() { if ( this.readyState == 4 ) console.log(this.responseText); } xhr.send( null ); This works perfectly fine in Firefox, Chrome, […]

JSF JavaScript problem – “jsf” is undefined

my webapplication works very fine with: Opera, FF, Chrome, Safari. Now i tested it on IE and there are some weird errors. I debugged my website with IE and it said: <a id=”navi:searchButton” href=”#” onclick=”jsf.util.chain(this,event,’activateSearchDiv();return false;’,’mojarra.jsfcljs(document.getElementById(\’navi\’),{\’navi:searchButton\’:\’navi:searchButton\’},\’\’)’);return false”>Search</a> >> “jsf” is not defined ( in jsf.util.chain ). But I do load these scripts: <h:body> <f:view contentType=”text/html”> […]

javascript error in IE cannot see or workout problem

In IE8 on vista I am getting the following JS error, User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2; .NET4.0C; .NET4.0E) Timestamp: Thu, 1 Sep 2011 12:18:24 UTC Message: Object doesn’t support this property or method Line: 28 […]

capturing bubbling key event from flash with javascript?

In IE, if flash has focus, and receives a keydown event, it does not appear to bubble the event up through the DOM (I can’t capture the event by listening on document, however the same listener can capture key events from html siblings, so I know my listener is working). However, some other plugins on […]

Bubbling an event triggered by disabled element

The question is: should the disabled element produce an event that will be triggered on its parent(s)? <div id=”test”> <button disabled=”disabled”>Click me</button> </div> <script type=”text/javascript”> document.getElementById(“test”).onclick = function() { alert(“Clicked!”); }; </script> All browsers except IE prevent the event from being fired, but IE doesn’t. Is this behavior documented or standardized? Which of browsers process […]

JQuery BlueImp File Upload plugin returns null result in IE

I’m having trouble getting the BlueImp jQuery file upload plugin to work correctly in IE. It works correctly in all other browsers tested. Specifically, the problem I’m having is that the “done” function isn’t getting data back from my handler (ASP.NET/C#). When I write the data that the done function sends out to the console, […]

Delay with Internet Explorer noticing changes to location.hash

This may be common knowledge, but I can’t seem to find anything out there regarding the issue. Here’s a little background: I have some pages that use Bootstrap’s tabbing system. In the $(document).ready() function for these pages is some basic code that activates a tab based on the hash in the URL, and a short […]

Javascript, detect if the textbox has focus?

I’m upgrading a script to make it crosss browser. The current code I have is as follows. function testFocus(){ var testSelection = document.getElementById(‘chattext’).contentWindow. window.document.selection.createRange().parentElement(); while (testSelection) { if (testSelection.id == “chatContent”) { return true; } testSelection = testSelection.parentElement; } return false; } However the following code no longer works in modern browsers. Presently the code […]