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


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



PANASONIC KX-NT553 Business IP Handset VoIP Office Phone picture

PANASONIC KX-NT553 Business IP Handset VoIP Office Phone

$49.99



Polycom Vvx 601 VoIP 16 Line Business Phone 4.3

Polycom Vvx 601 VoIP 16 Line Business Phone 4.3" HD Touchscreen PoE With Stand

$28.95



POLYCOM SoundPoint IP550 Digital VOIP Telephone picture

POLYCOM SoundPoint IP550 Digital VOIP Telephone

$20.00



Allworx Verge 9312 Voip IP Color Display Phone 8113120 Gigabit & Backlit picture

Allworx Verge 9312 Voip IP Color Display Phone 8113120 Gigabit & Backlit

$179.00



Lot of 10 Avaya Nortel 6120 WLAN NTTQ4020E6 WiFi VoIP Handsets picture

Lot of 10 Avaya Nortel 6120 WLAN NTTQ4020E6 WiFi VoIP Handsets

$279.99







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