Omnis Technical Note TNWE0007

Detecting browser HTML using Apache web server

for Omnis Studio
By PK

Deprecated Content
Due to its publication date, this technote contains information which may no longer be accurate or applicable on one or more of the platforms it refers to. Please refer to the index page which may contain updated information.

If you are using an Apache web server running under Linux you can use shtml to detect the user's type of browser and display the right Web Client plugin, either the Netscape or Internet Explorer plugin. For example, the following shtml file loads the FORMFLDS demo page and loads the appropriate plugin.


<html>
<head>
<title>OMNIS Web Client Gallery - FORMFLDS</title>
</head>
<body bgcolor="#FFFFFF">
<!--#if expr="$HTTP_USER_AGENT = /.*[Mm][Aa][Cc].*/ || $HTTP_USER_AGENT !=/.*[Mm][Ss][Ii][Ee].*/" -->
<p><embed type="application/OMNIS-RCC-plugin" name="rcc1" width="800" height="360"
OmnisServer="5000" OmnisLibrary="formflds" OmnisClass="rfForm"
WebServerUrl="services.omnis.net" WebServerScript="/cgi-bin/nph-omniscgi">
<!--#else -->
<object
classid="clsid:13510606-30FA-11D2-B383-444553540000" width="800" height="360">
<param name="_Version" value="65536">
<param name="_ExtentX" value="7161">
<param name="_ExtentY" value="7373">
<param name="_StockProps" value="0">
<param name="OmnisServer" value="5000">
<param name="OmnisLibrary" value="formflds">
<param name="OmnisClass" value="rfForm">
<param name="WebServerURL"
value="services.omnis.net"> <param name="WebServerScript"
value="/cgi-bin/nph-omniscgi">
</object>
<!-- ActiveX object END--></p>
</body>
</html>



We have used this technique throughtout the new Web Component Gallery. If you want to use the above example you'll need to change some of the parameters, such as the OmnisServer, OmnisLibrary, OmnisClass, and WebServerURL parameters.  

Search Omnis Developer Resources

 

Hit enter to search

X