[Zope] Test for browser version using dtml-if?

AM list_subscriber@neurobs.com
Wed, 02 Oct 2002 18:20:58 -0700


Did you try using :

REQUEST.HTTP_USER_AGENT

I use a simple one like this:

if container.REQUEST.HTTP_USER_AGENT.find('Netscape') > -1: return 'NS'
else: return 'IE'

hth
AM

Tim Hicks wrote:

>>Does anyone know how to test for browser version using <dtml-if>?  I  can
>>    
>>
>do
>  
>
>>it with javascript, but was wondering if it is possible to just use an if
>>statement?
>>    
>>
>
>You might try http://www.zope.org/Members/svenasse/UserSniffer .  It doesn't
>seem to have been updated in a while, but it worked quite nicely when a used
>it before.
>
>hth,
>
>tim
>
>
>_______________________________________________
>Zope maillist  -  Zope@zope.org
>http://lists.zope.org/mailman/listinfo/zope
>**   No cross posts or HTML encoding!  **
>(Related lists - 
> http://lists.zope.org/mailman/listinfo/zope-announce
> http://lists.zope.org/mailman/listinfo/zope-dev )
>
>
>  
>

-- 
==================================================================
 Aseem Mohanty							   
 Neurobehavioral Systems Inc, 828 San Pablo Ave, Albany, CA 94706 
 (R) 510 7696011 (M) 510 3014871 (O) 510 5279231		  	
==================================================================								  	
 "I saw `cout' being shifted "Hello world" times to the left and  
  stopped right there!!"                        -- Steve Gonedes  
==================================================================