Forums
Toggle Search
E Ink Everything
Retro Gaming
ChatGPT & AI
Security
Mobile
Automotive
Computing
AR & VR
Online
Club CrackBerry
BlackBerry Forums
Other Categories
Answer / Ask a Question
Reviews
Deals
Contests
Newsletter
Help & How To
News & Rumors
Log in
or
Sign up
Brightness
Light Mode
Dark Mode
© Journey Commerce Inc.
Terms & Conditions
Privacy Policy
CREATE
YOUR
ACCOUNT
ASK A QUESTION
TRENDING:
Blackberry 0168
187
How to Patch and Install the Basic Blackberry Playbook OS Apps
135
Upgrad Verification fail on my BlackBerry priv
129
Will an autoloader fix this?
125
Is the previous posts/info re: reset q10, autoloader still relevant today?
122
BlackBerry KEYone won't start, flashing LED - Help!
74
Forum
BlackBerry Developers
Developers Lounge
Javascript detect BlackBerry?
05-02-09 09:31 PM
tools
Advanced Search
View First Unread
Show Printable Version
1
https://forums.crackberry.com/showthread.php?t=219072&s=&p=2443587&viewfull=1#post2443587
essseabass
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!
05-01-09 11:58 AM
Like
0
9,473
https://forums.crackberry.com/showthread.php?t=219072&s=&p=2443949&viewfull=1#post2443949
Reed McLay
Retired Moderator
Welcome to CrackBerry.
I have moved your thread to the developers subfourms, perhaps somebody can help you here.
05-01-09 12:41 PM
Like
0
497
https://forums.crackberry.com/showthread.php?t=219072&s=&p=2455224&viewfull=1#post2455224
ydaraishy
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.
05-02-09 09:31 PM
Like
0
Forum
BlackBerry Developers
Developers Lounge
Javascript detect BlackBerry?
«
New to Java Dev
|
touch n slide
»
LINK TO POST COPIED TO CLIPBOARD