BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 01-05-2012, 05:36 PM   #1
ozziem
New Member
 
Join Date: Jan 2012
Model: 9780
PIN: N/A
Carrier: NO
Posts: 3
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
Dougsg38p
BlackBerry Extraordinaire
 
Join Date: Mar 2008
Location: Austin, TX
Model: 9700
PIN: N/A
Carrier: T-Mobile
Posts: 1,644
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
ozziem
New Member
 
Join Date: Jan 2012
Model: 9780
PIN: N/A
Carrier: NO
Posts: 3
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
Dougsg38p
BlackBerry Extraordinaire
 
Join Date: Mar 2008
Location: Austin, TX
Model: 9700
PIN: N/A
Carrier: T-Mobile
Posts: 1,644
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
ozziem
New Member
 
Join Date: Jan 2012
Model: 9780
PIN: N/A
Carrier: NO
Posts: 3
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



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

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 07:05 AM
BES 5.0 Exchange/Domino final documentation posted illy BES Admin Corner 9 05-12-2009 11:16 AM
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 02:21 PM


NEW Polycom VVX 501 VoIP IP Phone & Stand Tested VVX501 2200-48500-019 Lync picture

NEW Polycom VVX 501 VoIP IP Phone & Stand Tested VVX501 2200-48500-019 Lync

$43.98



Vtech ErisTerminal VSP861 Touchscreen Color Desktop - Voice-Over-IP VOIP Phone picture

Vtech ErisTerminal VSP861 Touchscreen Color Desktop - Voice-Over-IP VOIP Phone

$14.99



Polycom VVX 501 VoIP IP Phone & Stand Blem Tested VVX501 PoE 2201-48500-001 picture

Polycom VVX 501 VoIP IP Phone & Stand Blem Tested VVX501 PoE 2201-48500-001

$19.98



Cisco Business Office Phone CP-7942G/CP-7942 Unified IP  VoIP Display POE picture

Cisco Business Office Phone CP-7942G/CP-7942 Unified IP VoIP Display POE

$14.62



Polycom VVX 601 VoIP IP Phone & Stand Blem Tested VVX601 PoE 2201-48600-001 picture

Polycom VVX 601 VoIP IP Phone & Stand Blem Tested VVX601 PoE 2201-48600-001

$19.98



Polycom VVX 311 VoIP IP Phone & Stand Tested Reset VVX311 2201-48350-001 Skype picture

Polycom VVX 311 VoIP IP Phone & Stand Tested Reset VVX311 2201-48350-001 Skype

$14.98







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