
Browser Type and Version Checking
Certain project requires user to use different kind of browsers. To date, there are many types which include Microsoft’s Internet Explorer, Mozilla’s Firefox, Google’s Desktop and Chrome and other’s (Safari, Opera, Gecko). Jaca Associates [1] reported the top ranking browsers include Internet Explorer (IE) which has a market share of 66.0%, Firefox (FF) 18.5% and Google Desktop and Chrome 6.56%.
In order to check which browser that a user is using, one can deploy few lines of TSL codes [2]. An example given below is taken from a real case where an organisation has many users with different kind of IE versions. The example is a part of a large chunk of code for styling a scrollable <div> layer. Each output displayed is compared. Testing shows that IE8.0 has a different result.
We then configure the specific height, using Cascading Style Sheet (CSS) format:
.scrollable {
/* required settings */
position:relative;
overflow:hidden;
width: 897px;
<!--[if condition=" $_mxBrowser->browser !='IE' "]-->
<!--[general print="height: 113px;"]-->
<!--[/if]-->
<!--[elseif condition="$_mxBrowser->browser =='IE' && $_mxBrowser->version !='8.0' "]-->
<!--[general print="height: 113px;"]-->
<!--[/elseif]-->
<!--[elseif condition="$_mxBrowser->browser =='IE' && $_mxBrowser->version =='8.0' " ]-->
<!--[general print="height: 115px;"]-->
<!--[/elseif]-->
The TSL code given above is to illustrate the checking whether the user uses other browser than the famous IE (such as Firefox, Desktop and Chrome).
If he does not, then configure the height to 113px.
If yes, he uses IE, then system needs to check the version 8.0 or not.
If he uses IE8.0 then configure the height to 115px.
Hope that helps!
Reference:
[1] Janco Associates, Inc., “December 2010 Browser and OS Market Share Study”. Internet: http://e-janco.com/browser.htm, [March 23, 2011].
[2] Media Digital Alliance, "MXAE Programming Handbook". Internet: http://www.digialliance.com/index.php?ch=mda&pg=site&ac=172, [October 1, 2010]
MXAE Release News
MXAE 2.7.5 Released ![]() |
![]() |
Tips & Tricks
Program Listing With Page Navigation ![]() |
![]() |