Jump to content

How to prevent IE8-- run unigui?


Recommended Posts

As you now, if the client use IE6, there are so many problems(I think the main problem is that its JS engine is so slow so some problems occurs.) I think you can make an option to prevent IE8-- run unigui. Event the client cannot use the application with IE6, but it can also avoid some unknown errors, doesn't it?


Thanks in advance.

Link to comment
Share on other sites

uses ExtPascal;

procedure TfrmMain.UniFormCreate(Sender: TObject);
  l_userAgent : String;

  { Check client browser }
  if UniSession.Browser in [brUnknown, brIE, brKonqueror] then
    l_userAgent := UniSession.RequestHeader['HTTP_USER_AGENT'];

    { Different message for IE }
    if UniSession.Browser = brIE then
      if (Pos('MSIE 8', l_userAgent) > 0)
        or (Pos('MSIE 7', l_userAgent) > 0)
        or (Pos('MSIE 6', l_userAgent) > 0) then
        UniSession.AddJS('alert("Probablemente Ud. está utilizando una versión ' +
          'de Internet Explorer muy vieja.\nSi continúa utilizándolo, ' +
          'el Sebaot Web puede llegar a experimentar comportamientos inadecuados.\n' +
          'Recomendamos que actualice su Internet Explorer a una versión más nueva\n' +
          'o utilice otro navegador como ser, el Firefox o el Chrome ' +
          'para usar el Sebaot Web en este equipo.");');
    end else
      UniSession.AddJS('alert("Probablemente Ud. está utilizando un navegador ' +
        'que no es compatible con las funciones necesarias para utilizar el ' +
        'Sebaot Web.\nSi continúa con su uso, el Sebaot Web puede llegar a ' +
        'experimentar comportamientos inadecuados.\nRecomendamos que utilice ' +
        'otro navegador como el Firefox o el Chrome.");');
  end; // if

I hope this can be usefull for You...best Regards.

  • Upvote 3
Link to comment
Share on other sites

  • 4 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...