A custom control that should be on top of every page
This idea is shamelessly ripped from an XPages chat with Nathan who will contribute a <crashie6 ../> control to the Extension library soon. Go to the navigator view and create these 2 files in custom controls :
The xsp:
As usual: YMMV
The xsp:
<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core">
<!--[if lt IE 7]>
<div style='border: 1px solid #F7941D; background: #FEEFDA; text-align: center; clear: both; height: 75px; position: relative;'>
<div style='position: absolute; right: 3px; top: 3px; font-family: courier new; font-weight: bold;'><a href='#' onclick='javascript:this.parentNode.parentNode.style.display="none"; return false;'><img src='http://www.ie6nomore.com/files/theme/ie6nomore-cornerx.jpg' style='border: none;' alt='Close this notice'/></a></div>
<div style='width: 640px; margin: 0 auto; text-align: left; padding: 0; overflow: hidden; color: black;'>
<div style='width: 75px; float: left;'><img src='http://www.ie6nomore.com/files/theme/ie6nomore-warning.jpg' alt='Warning!'/></div>
<div style='width: 275px; float: left; font-family: Arial, sans-serif;'>
<div style='font-size: 14px; font-weight: bold; margin-top: 12px;'>You are using an outdated browser</div>
<div style='font-size: 12px; margin-top: 6px; line-height: 12px;'>For a better experience using this site, please upgrade to a modern web browser.</div>
</div>
<div style='width: 75px; float: left;'><a href='http://www.firefox.com' target='_blank'><img src='http://www.ie6nomore.com/files/theme/ie6nomore-firefox.jpg' style='border: none;' alt='Get Firefox 3.5'/></a></div>
<div style='width: 75px; float: left;'><a href='http://www.browserforthebetter.com/download.html' target='_blank'><img src='http://www.ie6nomore.com/files/theme/ie6nomore-ie8.jpg' style='border: none;' alt='Get Internet Explorer 8'/></a></div>
<div style='width: 73px; float: left;'><a href='http://www.apple.com/safari/download/' target='_blank'><img src='http://www.ie6nomore.com/files/theme/ie6nomore-safari.jpg' style='border: none;' alt='Get Safari 4'/></a></div>
<div style='float: left;'><a href='http://www.google.com/chrome' target='_blank'><img src='http://www.ie6nomore.com/files/theme/ie6nomore-chrome.jpg' style='border: none;' alt='Get Google Chrome'/></a></div>
</div>
</div>
<![endif]-->
</xp:view>
The xsp-config:
<xp:view xmlns:xp="http://www.ibm.com/xsp/core">
<!--[if lt IE 7]>
<div style='border: 1px solid #F7941D; background: #FEEFDA; text-align: center; clear: both; height: 75px; position: relative;'>
<div style='position: absolute; right: 3px; top: 3px; font-family: courier new; font-weight: bold;'><a href='#' onclick='javascript:this.parentNode.parentNode.style.display="none"; return false;'><img src='http://www.ie6nomore.com/files/theme/ie6nomore-cornerx.jpg' style='border: none;' alt='Close this notice'/></a></div>
<div style='width: 640px; margin: 0 auto; text-align: left; padding: 0; overflow: hidden; color: black;'>
<div style='width: 75px; float: left;'><img src='http://www.ie6nomore.com/files/theme/ie6nomore-warning.jpg' alt='Warning!'/></div>
<div style='width: 275px; float: left; font-family: Arial, sans-serif;'>
<div style='font-size: 14px; font-weight: bold; margin-top: 12px;'>You are using an outdated browser</div>
<div style='font-size: 12px; margin-top: 6px; line-height: 12px;'>For a better experience using this site, please upgrade to a modern web browser.</div>
</div>
<div style='width: 75px; float: left;'><a href='http://www.firefox.com' target='_blank'><img src='http://www.ie6nomore.com/files/theme/ie6nomore-firefox.jpg' style='border: none;' alt='Get Firefox 3.5'/></a></div>
<div style='width: 75px; float: left;'><a href='http://www.browserforthebetter.com/download.html' target='_blank'><img src='http://www.ie6nomore.com/files/theme/ie6nomore-ie8.jpg' style='border: none;' alt='Get Internet Explorer 8'/></a></div>
<div style='width: 73px; float: left;'><a href='http://www.apple.com/safari/download/' target='_blank'><img src='http://www.ie6nomore.com/files/theme/ie6nomore-safari.jpg' style='border: none;' alt='Get Safari 4'/></a></div>
<div style='float: left;'><a href='http://www.google.com/chrome' target='_blank'><img src='http://www.ie6nomore.com/files/theme/ie6nomore-chrome.jpg' style='border: none;' alt='Get Google Chrome'/></a></div>
</div>
</div>
<![endif]-->
</xp:view>
<?xml version="1.0" encoding="UTF-8"?>
<faces-config>
<faces-config-extension>
<namespace-uri>http://www.ibm.com/xsp/custom </namespace-uri>
<default-prefix>xc </default-prefix>
</faces-config-extension>
<composite-component>
<component-type>CustomerSense </component-type>
<composite-name>CustomerSense </composite-name>
<composite-file>/CustomerSense.xsp </composite-file>
<composite-extension>
<designer-extension>
<in-palette>true </in-palette>
<category>webStandards </category>
<render-markup> <xp:view xmlns:xp="http://www.ibm.com/xsp/core" >
[Remind users to use proper browsers] 
</xp:view > </render-markup>
</designer-extension>
</composite-extension>
<description>Make it crystal clear that IE6 isn't really an option anymore </description>
</composite-component>
</faces-config>
Read about the details of the campaign. Of course installing Chrome Frame is always an option if you have other applications with an IE6 depencency.
<faces-config>
<faces-config-extension>
<namespace-uri>http://www.ibm.com/xsp/custom </namespace-uri>
<default-prefix>xc </default-prefix>
</faces-config-extension>
<composite-component>
<component-type>CustomerSense </component-type>
<composite-name>CustomerSense </composite-name>
<composite-file>/CustomerSense.xsp </composite-file>
<composite-extension>
<designer-extension>
<in-palette>true </in-palette>
<category>webStandards </category>
<render-markup> <xp:view xmlns:xp="http://www.ibm.com/xsp/core" >
[Remind users to use proper browsers] 
</xp:view > </render-markup>
</designer-extension>
</composite-extension>
<description>Make it crystal clear that IE6 isn't really an option anymore </description>
</composite-component>
</faces-config>
As usual: YMMV
Posted by Stephan H Wissel on 28 April 2011 | Comments (4) | categories: XPages