PDA

View Full Version : Browser sniffer question



JMason
05-04-2005, 10:23 PM
Script: Browser Sniffer
http://www.dynamicdrive.com/dynamicindex9/browsersniffer.htm

Is there any way for this script to open a dialog box if a site visitor is using a particular browser/OS?

For instance, if I wanted to give a Mac user with an IE browser a message, could this script be used to do so?

Thanks for the assistance in advance!

Jeff

jscheuer1
05-05-2005, 04:42 AM
if (mac&&ie5) {
var answer = confirm('Confirm Dialogue Text Goes Here');
if (answer){
code for what to do if user clicks ok goes here
use as many lines as you need
}
else {
code for what to do if user clicks cancel goes here
use as many lines as you need
}
}

JMason
05-05-2005, 01:23 PM
Thanks! I appreciate the help! Going to go use it now.