Go Back   BlackBerry Forums at CrackBerry.com > BlackBerry Professionals > Developer's Forum

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 05-01-2009, 01:58 PM
CrackBerry Newbie
Device Model: 8800
Carrier: AT&T/Cingular
 
Join Date: May 2009
Posts: 1
Default Javascript detect BlackBerry?

OK - so I have found a great simple script for detecting an iphone and redirecting - is there an equivalent for all blackberries?

<script language=javascript>
<!--
if((navigator.userAgent.match(/iPhone/i)) || (navigator.userAgent.match(/iPod/i)))

{
location.href='linktonewurl';
}
-->

Thanks!
Reply With Quote
  #2  
Old 05-01-2009, 02:41 PM
Reed McLay's Avatar
Forums Moderator
Device Model: 8120 Pearl / 8320 Curve
Carrier: Rogers TalkSpot UMA
 
Join Date: Dec 2007
Location: Canada
Posts: 7,242
Default

Welcome to CrackBerry.

I have moved your thread to the developers subfourms, perhaps somebody can help you here.
__________________
Reply With Quote
  #3  
Old 05-01-2009, 02:42 PM
tbaugus334's Avatar
CrackBerry User
Device Model: 8830 World Edition
Carrier: Verizon
 
Join Date: Dec 2008
Location: Montgomery, AL
Posts: 13
Default

Welcome to crackberry!
Reply With Quote
  #4  
Old 05-02-2009, 11:31 PM
CrackBerry Abuser
Device Model: 9000 (Bold)
Carrier: Vodafone
 
Join Date: Oct 2008
Posts: 489
Default

Yes, detect the Blackberry user agent.

The Blackberry browser can choose which user agent they wish to present to the server, so keep that in mind.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Trackbacks are On
Pingbacks are On
Refbacks are On



 
 Site Support | Accessory Order Support | App Store Support | Advertise | Newsletter | About Us

Creating smartphone communities
Android Central - Android reviews, news and forums Crackberry - Blackberry news, reviews and community TiPb - iPhone news, accessory reviews & forums
Pre Central - Palm Pre Review, News and Community Treo Central - Treo & Centro News and Forums WMExperts - Windows Mobile Reviews & News

The names RIM and BlackBerry are registered Trademarks of Research in Motion Limited.
CrackBerry.com is in No Way Affiliated with Research in Motion Limited.
Copyright ©2007-2009 Smartphone Experts. Terms and Conditions. Privacy Policy. All rights reserved.