I have the following html that determines if useragent is from a Blackberry device. I would like to know how to replace the download URL with a specific one for the device, that is, I would like to direct the user to download to the 9800 device if its device is 9800. please, can anyone help?
<!DOCTYPE html> <html> <body> <script type="text/javascript"> var ua = navigator.userAgent; document.write("BB OS Version :: " + ua); if (ua.indexOf("BlackBerry") >= 0) { if (ua.indexOf("Version/") >= 0) { </script> <br> <a href="http://mysite.com/download">Download</a> </body> </html>
source share