Getting OneUi V2.01 to work with Internet Explorer 6

I have been struggling to get an XPage application to work well with Internet Explorer 6 using the OneUIV2 style sheet. There is some useful documentation from IBM which explains that the IE6 CSS hacks are done differently in this V2 of OneUI.

The answer is to add this code to your xpage. In my case I added it to a banner custom control using a computed field

<xp:text escape=”false” id=”CSS_Hack”><xp:this.value><![CDATA[${javascript:”<!–[if IE 6]><script type=”text/javascript”>document.getElementsByTagName(“html”)[0].className+=” lotusui_ie lotusui_ie6″;</script><![endif]–><!–[if IE 7]><script type=”text/javascript”>document.getElementsByTagName(“html”)[0].className+=” lotusui_ie lotusui_ie7″;</script><![endif]–><!– END exampleHead.htm –>” }]]></xp:this.value></xp:text>

Hope this helps someone else who has been pulling their hair out with ie6.

Sean
p.s. you can also use the following SSJS to detect ie6

if (context.getUserAgent().isIE(0,6)) {
// do something like suggest a better browser
}

Leave a Reply

Your email address will not be published. Required fields are marked *

1 + 2 =