View Single Post
Old 10-24-2008, 05:07 PM   #10 (permalink)
sketchMedia
The Prestige
Advanced Programmer Top Contributor Good Samaritan 
 
sketchMedia's Avatar
 
Join Date: Oct 2007
Location: Manchester, UK
Posts: 836
Thanks: 31
sketchMedia is on a distinguished road
Default

Dont use browser detection, instead use object detection:
javascript Code:
function createRequestObject() {
    try{
        return new XMLHttpRequest();
    } catch (e) {
        try{
            return new ActiveXObject("Msxml2.XMLHTTP");
        } catch (e) {
            try{
                return new ActiveXObject("Microsoft.XMLHTTP");
            } catch (e) {
                return false;
            }
        }
    }
}

For more information: Javascript - Object detection
__________________
mysql> SELECT * FROM `users` WHERE `users`.`clue` > 0;
Empty set (0.00 sec)
sketchMedia is offline  
Reply With Quote
The Following 2 Users Say Thank You to sketchMedia For This Useful Post:
chrisb (10-24-2008), iory (10-24-2008)