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


MOSTEK Z80  DIP CPU 40 Pin Genuine Commodore 128/PET processor picture

MOSTEK Z80 DIP CPU 40 Pin Genuine Commodore 128/PET processor

$3.49



Vintage MOS 8502 8502R0 Commodore C64 very rare good condition x 1pc picture

Vintage MOS 8502 8502R0 Commodore C64 very rare good condition x 1pc

$22.00



6500/1 A 6502 VARIENT CPU COMMODORE USE IN AMIGA KB & 1520 PLOTTER NMOS NCR NOS picture

6500/1 A 6502 VARIENT CPU COMMODORE USE IN AMIGA KB & 1520 PLOTTER NMOS NCR NOS

$5.89



MCR 6003X3 Commodore PVC/Non-Woven Poly/Nylon RAIN Suit 3 PC YELLOW  SIZE 3XL picture

MCR 6003X3 Commodore PVC/Non-Woven Poly/Nylon RAIN Suit 3 PC YELLOW SIZE 3XL

$13.99



Jelenko Commodore LS VPF with Pump  picture

Jelenko Commodore LS VPF with Pump

$875.00



Windsor Commodore Duo 20

Windsor Commodore Duo 20" Carpet extractor w/Lester Charger 25900/Battery/99hour

$2519.95







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