Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 10-08-2008, 07:28 PM   PM User | #1
ubh
Regular Coder

 
ubh's Avatar
 
Join Date: Apr 2008
Location: Portland, Oregon U.S.A.
Posts: 443
Thanks: 108
Thanked 15 Times in 14 Posts
ubh is on a distinguished road
Browser Version Sniffer

Been looking for a browser sniffer script for IE5 and below.

I want to avoid IE5 and below from using a script but everything I have seen detects IE5 and IE6 as being the same.

thanks.
ubh is offline   Reply With Quote
Old 10-08-2008, 07:58 PM   PM User | #2
Basscyst
Smokes a Lot


 
Join Date: Jul 2003
Location: CA, USA
Posts: 1,594
Thanks: 5
Thanked 20 Times in 20 Posts
Basscyst is on a distinguished road
It's best not to use a browser sniffer, you should use object detection to differentiate code paths. Post a sample of your code and maybe someone can help you out.
__________________
Helping to build a bigger box. - Adam Matthews
Basscyst is offline   Reply With Quote
Old 10-08-2008, 08:11 PM   PM User | #3
ubh
Regular Coder

 
ubh's Avatar
 
Join Date: Apr 2008
Location: Portland, Oregon U.S.A.
Posts: 443
Thanks: 108
Thanked 15 Times in 14 Posts
ubh is on a distinguished road
Ok well I am using the motion tween lib from here:
Motion Tween Libs

and utilizing its opacity tween function along with its color tween function to preform a very slick fadein when a visitor comes to my site.

unfortunately by using "IETester" it clearly wont work with IE5 but IE6 and up works perfect.

I even pointed IE5 to the Motion Tween Libs site and tried to run the demos but same result its just too modern for IE5.

I don't want to loose the effect, but am willing to drop the effect for IE5 alone.

here is my script:

Code:
function startLoading()
{
var docBody = document.getElementsByTagName('body')[0];
docBody.style.background="url(images/loading.gif)";
docBody.style.backgroundColor="#797979";
docBody.style.backgroundPosition="center";
docBody.style.backgroundRepeat="no-repeat";

setTimeout('opacityLoad()',4000);
}

function opacityLoad()
{
document.getElementsByTagName('body')[0].style.background="";	

bodyColorTween = new ColorTween(document.getElementsByTagName('body')[0].style, 'backgroundColor', Tween.regularEastIn, '797979', 'FFFFFF', 1);
bodyColorTween.start()

headerFadeIn = new OpacityTween(document.getElementById('header'),Tween.regularEaseIn, 0, 100, 1);
setTimeout('headerFadeIn.start()',200);

logoFadeIn = new OpacityTween(document.getElementById('logo'),Tween.regularEaseIn, 0, 100, 1);
setTimeout('logoFadeIn.start()',200);

navigationFadeIn = new OpacityTween(document.getElementById('navigation'),Tween.regularEaseIn, 0, 100, 1);
setTimeout('navigationFadeIn.start()',600);

mainFadeIn = new OpacityTween(document.getElementById('main'),Tween.regularEaseIn, 0, 100, 1);
setTimeout('mainFadeIn.start()',800);

contentFadeIn = new OpacityTween(document.getElementById('content'),Tween.regularEaseIn, 0, 100, 1);
setTimeout('contentFadeIn.start()',1000);

bgDecoFadeIn = new OpacityTween(document.getElementById('bg_deco'),Tween.regularEaseIn, 0, 100, 2);
setTimeout('bgDecoFadeIn.start()',1500);

//SLIDE NAVIGATION ARROW IN FROM THE RIGHT
navArrowStart = new Tween(document.getElementById('nav_arrow').style,'left',Tween.elasticEaseOut,700,40,4,'px'); 
setTimeout('navArrowStart.start()',1000);

//FADE IN NAVIGATION ARROW
navArrowFadeIn = new OpacityTween(document.getElementById('nav_arrow'),Tween.regularEaseIn, 0, 100, 1);
setTimeout('navArrowFadeIn.start()',1200);
}
ubh is offline   Reply With Quote
Old 10-09-2008, 12:27 AM   PM User | #4
rnd me
Senior Coder

 
rnd me's Avatar
 
Join Date: Jun 2007
Location: Urbana
Posts: 3,462
Thanks: 9
Thanked 466 Times in 450 Posts
rnd me is a jewel in the roughrnd me is a jewel in the roughrnd me is a jewel in the rough
i would let it rust.
ie 5.5 is less than 0.1 % of users.

not worth throwing away ie6 support (~25% of users).
__________________
my site (updated 5/13)
STATS (2013/5) HTML5:90.2% MOB:14% IE7:0.5% IE8:8.6% IE9:9.8% IE10:10%
rnd me is offline   Reply With Quote
Old 10-09-2008, 12:53 AM   PM User | #5
ubh
Regular Coder

 
ubh's Avatar
 
Join Date: Apr 2008
Location: Portland, Oregon U.S.A.
Posts: 443
Thanks: 108
Thanked 15 Times in 14 Posts
ubh is on a distinguished road
wow 1/10th of a percent?

See this is the information I would like to see more often on all sites crying out for slenderizing across the board inorder to fix cross browser frustrations.

Don't get me wrong I am a fully supporter of slenderizing/xhtml an all but please someone, tell me where to draw the lines at full cross browser and browser version compatibility.

thank you rnd me, do have some sites that can show me more stats on current most used browsers and languages?
ubh is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:07 AM.


Advertisement
Log in to turn off these ads.