BrowserSetting

Detect Browser setting (type or other info) using MSWC.browsertype object.
Old code I found and brushed a little bit

CodeFunctionName
What is this?

Public

Not Tested

Imported
Function BrowserSetting(SettingID)
    ' SettingID = 1 to return Browser type            Browser type ! Server.CreateObject("MSWC.BrowserType").Browser
    '                 = 2 to return Browser version        Browser Version ! Server.CreateObject("MSWC.BrowserType").Version
    '                 = 3 to return Browser cookies supported or not        Supports cookies or not ! Server.CreateObject("MSWC.BrowserType").Cookies
    '                 = 4 to return Browser vbscript supported or not        Supports VBScript or not ! Server.CreateObject("MSWC.BrowserType").VBScript
    '                 = 5 to return Browser javascript supported or not    Supports JavaScript or not ! Server.CreateObject("MSWC.BrowserType").JavaScript
    '                 = 6 to return Browser frames supported or not        Supports Frames or not ! Server.CreateObject("MSWC.BrowserType").Frames
    Rett                        = ""
    Select Case SettingID
    Case 1
        Rett                    = Server.CreateObject("MSWC.BrowserType").Browser
    Case 2
        Rett                    = Server.CreateObject("MSWC.BrowserType").Version
    Case 3
        Rett                    = Server.CreateObject("MSWC.BrowserType").Cookies
    Case 4
        Rett                    = Server.CreateObject("MSWC.BrowserType").VBScript
    Case 5
        Rett                    = Server.CreateObject("MSWC.BrowserType").JavaScript
    Case 6
        Rett                    = Server.CreateObject("MSWC.BrowserType").Frames
    Case Else
    End Select
    BrowserSetting            = Rett
End Function

SettingID

Views 139

Downloads 35

CodeID
DB ID