erich.wanker Posted August 5, 2014 Posted August 5, 2014 Hello folks, how can i show just InternetExplorer-Users (Version 6 7 8 9 10 11 ) a messagebox ? Message would be like: "Use Chrome, Firefox or Opera..) ThanX Erich
erich.wanker Posted August 6, 2014 Author Posted August 6, 2014 Hello choo .. the code: var C : TUniClientInfoRec; begin label_ra.Caption:=UniApplication.RemoteAddress; C:=UniApplication.ClientInfoRec; label_bt.Caption:=C.BrowserType; label_bv.Caption:=IntToStr(C.BrowserVersion); label_os.Caption:=C.OSType; interpretes my InternetExplorer 11 as: gecko 0 windows 80.122..... ? Thanx for suggestions
choo Posted August 7, 2014 Posted August 7, 2014 What are You so surprised? Really new IE11 = "Mozilla... like Gecko" IE11's Default UA StringBy default, Internet Explorer 11 on Windows 8.1 sends the following User-Agent string: Mozilla/5.0 (Windows NT 6.3; Trident/7.0; rv:11.0) like Gecko This string is deliberately designed to cause most UA-string sniffing logic to interpret it either Gecko or WebKit. This design choice was a careful one—the IE team tested many UA string variants to find out which would cause the majority of sites to “just work” for IE11 users. Contrast this string with the old IE10 on Windows 8 UA string: Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; Trident/6.0) Many websites would scan for the MSIE token and, if present, return non-standard markup which would not render properly in modern versions of IE.
erich.wanker Posted August 7, 2014 Author Posted August 7, 2014 ..but i want to show JUST InternetExplorer-users a message (see my first posting..) ... ?
choo Posted August 7, 2014 Posted August 7, 2014 if C.BrowserType = 'ie' or (C.BrowserType = 'gecko' and C.BrowserVersion = 0) then MessageDlg('Bla-bla-bla', mtWarning, [mbOK]); Than not the solution? Чем не решение?
Sherzod Posted August 7, 2014 Posted August 7, 2014 IE 11 is not officially supported prior to ExtJS 4.2.2 (see property isIE11). Microsoft removed the MSIE part from IE11's user agent (refer here), which is the reason why it does not work with ExtJS 4.2.1 (i.e. the latest GPL version) and below. From the source code, for ExtJS 4.2.1: isIE = !isOpera && check(/msie/), isIE7 = isIE && ((check(/msie 7/) && docMode != 8 && docMode != 9 && docMode != 10) || docMode == 7), isIE8 = isIE && ((check(/msie 8/) && docMode != 7 && docMode != 9 && docMode != 10) || docMode == 8), isIE9 = isIE && ((check(/msie 9/) && docMode != 7 && docMode != 8 && docMode != 10) || docMode == 9), isIE10 = isIE && ((check(/msie 10/) && docMode != 7 && docMode != 8 && docMode != 9) || docMode == 10), isIE6 = isIE && check(/msie 6/), and for ExtJS 4.2.2: isIE = !isOpera && (check(/msie/) || check(/trident/)), isIE7 = isIE && ((check(/msie 7/) && docMode != 8 && docMode != 9 && docMode != 10) || docMode == 7), isIE8 = isIE && ((check(/msie 8/) && docMode != 7 && docMode != 9 && docMode != 10) || docMode == 8), isIE9 = isIE && ((check(/msie 9/) && docMode != 7 && docMode != 8 && docMode != 10) || docMode == 9), isIE10 = isIE && ((check(/msie 10/) && docMode != 7 && docMode != 8 && docMode != 9) || docMode == 10), isIE11 = isIE && ((check(/trident\/7\.0/) && docMode != 7 && docMode != 8 && docMode != 9 && docMode != 10) || docMode == 11), isIE6 = isIE && check(/msie 6/), source: http://stackoverflow.com/questions/21881671/ext-isie-return-false-in-ie-11
Sherzod Posted August 7, 2014 Posted August 7, 2014 try this link may help: http://stackoverflow.com/questions/18871760/how-to-detect-ie-11-with-javascript-in-asp-net
erich.wanker Posted August 7, 2014 Author Posted August 7, 2014 Thanks to choo and Delphi Developer for Infos .. and thanks Farshad for moving in "Feature Request" :-) Erich
Recommended Posts