Thema: Delphi Intraweb im Netzwerk

Einzelnen Beitrag anzeigen

Despaired

Registriert seit: 7. Mai 2012
18 Beiträge
 
#7

AW: Intraweb im Netzwerk

  Alt 22. Okt 2012, 10:38
Hi,

ich hatte ein ähnliches Problem, vielleicht hilft dir das hier weiter

Delphi-Quellcode:
procedure TIWServerController.IWServerControllerBaseBrowserCheck(aSession: TIWApplication; var rBrowser: TBrowser);
var
  MinVersion: Single;
begin
  // unknown browser
  if (rBrowser is TOther) then begin
    rBrowser.Free;
    // accept the unknown browser as Internet Explorer 8
    rBrowser := TInternetExplorer.Create(8);
  end
  // if is Safari, but older version
  else if (rBrowser is TSafari) and (not rBrowser.IsSupported) then begin
    MinVersion := rBrowser.MinSupportedVersion;
    rBrowser.Free;
    // we will create it as the minimum supported version
    rBrowser := TSafari.Create(MinVersion);
  end
  // if is Chrome, but older version
  else if (rBrowser is TChrome) and (not rBrowser.IsSupported) then begin
    MinVersion := rBrowser.MinSupportedVersion;
    rBrowser.Free;
    // we will create it as the minimum supported version
    rBrowser := TChrome.Create(MinVersion);
  end
  // if is Firefox, but older version
  else if (rBrowser is TFirefox) and (not rBrowser.IsSupported) then begin
    MinVersion := rBrowser.MinSupportedVersion;
    rBrowser.Free;
    // we will create it as the minimum supported version
    rBrowser := TFirefox.Create(MinVersion);
  end
  // if is IE, but older version
  else if (rBrowser is TInternetExplorer) and (not rBrowser.IsSupported) then begin
    MinVersion := rBrowser.MinSupportedVersion;
    rBrowser.Free;
    // we will create it as the minimum supported version
    rBrowser := TInternetExplorer.Create(MinVersion);
  end;
end;
Gruß

Geändert von Despaired (22. Okt 2012 um 10:45 Uhr)
  Mit Zitat antworten Zitat