Results 1 to 3 of 3

Thread: Browser sniffer question

  1. #1
    Join Date
    Nov 2004
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Browser sniffer question

    Script: Browser Sniffer
    http://www.dynamicdrive.com/dynamici...sersniffer.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

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    Code:
    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
    }
    }
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Nov 2004
    Posts
    5
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Thanks! I appreciate the help! Going to go use it now.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •