Why is document.getElementById(‘tableId’).innerHTML not working in IE8?

Since the problem is in IE8, see MSDN: The property is read/write for all objects except the following, for which it is read-only: COL, COLGROUP, FRAMESET, HEAD, HTML, STYLE, TABLE, TBODY, TFOOT, THEAD, TITLE, TR. (emphasis mine) Colin’s work-around (setting innerText on the td instead of innerHTML on the tr) is a good one in … Read more

with an inner not triggering :active state in IE 8

Right, terribly over-complicated solution (and still imperfect), but: if you don’t wrap the link text in the <span>, and instead just use the <span> as a place to put your background image and position it absolutely within the <a>, then the <span> (mostly) stops blocking the :active state. Test page: http://www.pauldwaite.co.uk/test-pages/2769392/3/ HTML <a class=”button” href=”#”> … Read more

jQuery.getJSON not working properly in IE8 with gdata json-c. Why? [duplicate]

I can’t tell you if it’s an error in jquery or IE, but it looks like the XDomainRequest fails in IE. Add this to the URL: &callback=? …so the response will be handled as jsonp. Edit: It looks like Microsoft’s XDOmainRequest is not implemented in jQuery, so you can’t run Cross-Domain-Requests in jQuery using IE(except … Read more

Is there any way to detect that window is currently active in IE8?

I’ve written a jQuery plugin that does this: http://mths.be/visibility It gives you a very simple API that allows you to execute callbacks when the page’s visibility state changes. It does so by using the the Page Visibility API where it’s supported, and falling back to good old focus and blur in older browsers. Demo: http://mathiasbynens.be/demo/jquery-visibility … Read more

Z-index broken in IE8?

The simple answer is to add a z-index value that is greater than the .thumbnail:hover value to the hover state of the span. .thumbnail:hover span{ /*CSS for enlarged image on hover*/ visibility: visible; top: -140px; /*position where enlarged image should offset horizontally */ left: -500px; z-index: 51; }

.indexOf function on an array not working in IE7/8 using JavaScript

On IE<9 indexOf() it is not “well” implemented. Try to add this function on your code : if (!Array.prototype.indexOf) { Array.prototype.indexOf = function(elt /*, from*/) { var len = this.length; var from = Number(arguments[1]) || 0; from = (from < 0) ? Math.ceil(from) : Math.floor(from); if (from < 0) from += len; for (; from … Read more

How do I get placeholder text in firefox and other browsers that don’t support the html5 tag option?

One day I’ll get around to properly documenting this, but see this example: http://dorward.me.uk/tmp/label-work/example.html In short — position a <label> under a transparent <input> using <div> to provide background colour and borders. Then use JS to determine if the label should be visible or not based on focusing. Apply different styles when JS is not … Read more