Posts

Showing posts from May, 2014

Dojo: Problem of having TabContainer inside ContentPane in IE8

Image
In Dojo, the popular JavaScript library, we have ContentPane which allows us to put different widget into it, such as TabContainer , DataGrid , etc. They works fine in most browsers, but in IE 8, that could be a bit tricky. Suppose we have the following code fragment: <div id="testContentPane"       data-dojo-type="dijit/layout/ContentPane""       style="height: 200px; overflow: auto; border: 5px blue solid;">     testing 1 <br> testing 2 <br> testing 3 <br>      testing 4 <br> testing 5 <br> testing 6 <br><br>          <div id="testTabContainer"           data-dojo-type="dijit/layout/TabContainer"          style="width:80%; height:200px;"           disabled='disabled'>                   <div id="t...

Using JavaScript to detect IE 8

I was just thinking to use the following JavaScript to detect IE 8:   navigator.appVersion.indexOf("MSIE 8") > -1 But you know, when IE 8 is in compatibility mode, the agent string will become MSIE 7 instead. So, use the following to check for IE 8 for safe:   navigator.appVersion.indexOf("Trident/4") > -1