I have a script that determines which types of browsers use rich text
editing. The problem I am having is with Mozilla browsers. I can detect IE,
Mozilla, and Netscape but not Mozilla Firebird. Firebirds latest release is
enabled for rich text editing. Here is the code. Can anyone help?

UserAgent For Firebird= Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US;
rv:1.5a) Gecko/20030728 Mozilla Firebird/0.6.1

strBrowser = Request.ServerVariables("HTTP_USER_AGENT")
'browser is not MAC or Opera acting as IE
If InStr(1, strBrowser, "MSIE", 1) AND InStr(1, strBrowser, "MAC", 1) = 0
AND InStr(1, strBrowser, "Opera", 1) = 0 Then
   'IE version 5.5 or greater
   If Trim(Mid(strBrowser, CInt(inStr(1, strBrowser, "MSIE", 1)+5), 3))
=>5.5 Then
   browserType = "IE55+"
     Else
   browserType = "nonRTE"
   End If
   'browser is Mozilla or Netscape supporting RTE
    ElseIf inStr(1, strBrowser, "Gecko", 1) AND inStr(1, strBrowser,
"Firebird", 1) = 0 Then
   'Mozilla or Netscape version 1.3 or above
   If Trim(Mid(strBrowser, CInt(inStr(1, strBrowser, "rv:", 1)+3), 3)) =>1.3
Then
   browserType = "Mozilla"
   Else
   browserType = "nonRTE"
  End If
  Else
  browserType = "nonRTE"
End If


-- 
The online resource for web development
http://www.source4developers.com


_______________________________________________
mozilla-editor mailing list
[EMAIL PROTECTED]
http://mail.mozilla.org/listinfo/mozilla-editor

Reply via email to