Jump to content

Recommended Posts

Posted

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

Posted

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

Posted

What are You so surprised? Really new IE11 = "Mozilla... like Gecko"    :)

 

IE11's Default UA String

By 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.

Posted

if C.BrowserType = 'ie' or (C.BrowserType = 'gecko' and C.BrowserVersion = 0) then 

    MessageDlg('Bla-bla-bla', mtWarning, [mbOK]);

 

Than not the solution?

 

Чем не решение?

Posted

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

Posted

Thanks to choo and Delphi Developer for Infos ..

 

and thanks Farshad for moving in "Feature Request" 

 

:-)

 

Erich

×
×
  • Create New...