BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 01-05-2012, 05:36 PM   #1 (permalink)
New Member
 
Join Date: Jan 2012
Model: 9780
PIN: N/A
Carrier: NO
Posts: 3
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Blackberry Version Detection javascript code

Please Login to Remove!

Hi, I publish .net application to blackberries. In 9700 and lower versions, There is no problem, but after 9780 , styles looks very big in blackberry.

I want to use different css file for versions greater than 9780, but How can I detect blackberry version?
I find this , but I cant detect 9780, anyone knows howe can I detect 9780 and greater versions?

var x= navigator.userAgent.toLowerCase();
var y = (x.indexOf("blackberry9") != -1);

And Im new to bbery, version 9 means bberry 9000 and greater, is it true?

Sorry for easy question
Offline  
Old 01-05-2012, 07:45 PM   #2 (permalink)
BlackBerry Extraordinaire
 
Join Date: Mar 2008
Location: Austin, TX
Model: 9700
PIN: N/A
Carrier: T-Mobile
Posts: 1,644
Post Thanks: 0
Thanked 34 Times in 33 Posts
Default Re: Blackberry Version Detection javascript code

The user agent header actually has the entire model number, like this:

"Blackberry9780"

You are only looking at the first digit. Just change your code to look for the rest of the data.
Offline  
Old 01-06-2012, 05:04 AM   #3 (permalink)
New Member
 
Join Date: Jan 2012
Model: 9780
PIN: N/A
Carrier: NO
Posts: 3
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Re: Blackberry Version Detection javascript code

This doesn't work. When I put "blackberry9700", It detects 9700 but When I put blackberry9780, this doesn't detect
Offline  
Old 01-06-2012, 09:29 AM   #4 (permalink)
BlackBerry Extraordinaire
 
Join Date: Mar 2008
Location: Austin, TX
Model: 9700
PIN: N/A
Carrier: T-Mobile
Posts: 1,644
Post Thanks: 0
Thanked 34 Times in 33 Posts
Default Re: Blackberry Version Detection javascript code

Then you need to do some debugging and find the issue.
Offline  
Old 01-06-2012, 09:42 AM   #5 (permalink)
New Member
 
Join Date: Jan 2012
Model: 9780
PIN: N/A
Carrier: NO
Posts: 3
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Re: Blackberry Version Detection javascript code

"blackberry 9780" is the KEY. Put space character after blackberry, In Internet, there is no site about this, yhis answer is the first
Offline  
Closed Thread


Thread Tools

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads for: Blackberry Version Detection javascript code
Thread Thread Starter Forum Replies Last Post
Knowledge Sharing - Perform basic troubleshooting steps for Novell GroupWise noname BES Admin Corner 1 01-12-2010 07:33 AM
Web Desktop 5 no application loader Walter_Str BES Admin Corner 2 08-27-2009 08:05 AM
BES 5.0 Exchange/Domino final documentation posted illy BES Admin Corner 9 05-12-2009 12:16 PM
BES 4.1 SP4 MR4 - Now Available (Exchange) vhato BES Admin Corner 10 01-08-2008 04:01 PM
Blackberry Enterprise Activation Woes rgf207 BES Admin Corner 2 05-23-2007 03:21 PM





Copyright 2004-2014 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.