I have created this site - http://www.dragonflyfrms.com/
It includes some coding and ".png" files that are not compatible with IE6 (and probably older). There for I created another set of pages for older sites (http://www.dragonflyfrms.com/styleb/indexb.htm).
I did some looking around to try to find javascript that would detect older browsers and if needed redirect to the second set of pages. So far, at the moment this is what I have:
<script type="text/javascript">
var browser = navigator.appName;
var b_version = navigator.appVersion;
var version = parseFloat( b_version );
var is_explorer7 = false;
var position = b_version.indexOf( "MSIE 7." );
if( position != -1 )
{
is_explorer7 = true;
}
if ( browser == "Microsoft Internet Explorer" )
{
if ( version >= 6 || is_explorer7 )
{
document.location.href="http://www.dragonflyfrms.com/"
}
else
{
document.location.href="http://www.dragonflyfrms.com/styleb/indexb.htm"
}
</script>
I have it in the header tags of the initial page, but when I test in IE5.5 the page is not redirected.
- Do I need to specify for each older version of IE, or can I have it simply detect for anything older the 7?
- Do I need to have an "onload function" with in the body tag?
- Is my script completely off, if so how do I make it work?
Thank you for any help ahead of time.
It includes some coding and ".png" files that are not compatible with IE6 (and probably older). There for I created another set of pages for older sites (http://www.dragonflyfrms.com/styleb/indexb.htm).
I did some looking around to try to find javascript that would detect older browsers and if needed redirect to the second set of pages. So far, at the moment this is what I have:
<script type="text/javascript">
var browser = navigator.appName;
var b_version = navigator.appVersion;
var version = parseFloat( b_version );
var is_explorer7 = false;
var position = b_version.indexOf( "MSIE 7." );
if( position != -1 )
{
is_explorer7 = true;
}
if ( browser == "Microsoft Internet Explorer" )
{
if ( version >= 6 || is_explorer7 )
{
document.location.href="http://www.dragonflyfrms.com/"
}
else
{
document.location.href="http://www.dragonflyfrms.com/styleb/indexb.htm"
}
</script>
I have it in the header tags of the initial page, but when I test in IE5.5 the page is not redirected.
- Do I need to specify for each older version of IE, or can I have it simply detect for anything older the 7?
- Do I need to have an "onload function" with in the body tag?
- Is my script completely off, if so how do I make it work?
Thank you for any help ahead of time.

Comment