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


Dec/Adac Corp. D4-10390 Rev 6 Model 1664ATTL Output Pulse Board 1983 (B16) picture

Dec/Adac Corp. D4-10390 Rev 6 Model 1664ATTL Output Pulse Board 1983 (B16)

$189.99



VINTAGE Bruker Board DEC W4P3042 for SpectroSpin 250 picture

VINTAGE Bruker Board DEC W4P3042 for SpectroSpin 250

$99.99



HSS 12pcs Valve Seat & Face Cutter 45dec 30dec 20dec for Vintage Car, Bikes ,Jee picture

HSS 12pcs Valve Seat & Face Cutter 45dec 30dec 20dec for Vintage Car, Bikes ,Jee

$235.94



Niedermaier vintage Mannequins Visual Display Props Dec. 1991 Catalogue picture

Niedermaier vintage Mannequins Visual Display Props Dec. 1991 Catalogue

$141.00



Sketchy Chics - June 2021 - December 2022. Vintage Collection Art picture

Sketchy Chics - June 2021 - December 2022. Vintage Collection Art

$22.50



Adec Vintage Adjusting Dentist Doctor Medical Stool Rolling Swivel Chair picture

Adec Vintage Adjusting Dentist Doctor Medical Stool Rolling Swivel Chair

$199.99







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