Since cookies have been brought up, I tried the following code (Using
Steve's example):

<dtml-if expr="RESPONSE.setCookie('name', 'value', path='/', expires=(
ZopeTime() + (1.0/102.0) )">
         "You have cookies enabled"
  "Your browser does not support cookies"

The cookie gets set and the text that displays is from the else part, so
the cookie is set and I tell the user their browser doesn't support

1. I want to know if the user's browser supports cookies.

I am getting ready to develop a help page for people using our proxy
server and I need to add their browser capabilities to a database and
respond to the user the settings they have in a "layman" terminology.  I
plan on putting in a <dtml-call> on each side of the else that will
update the database.  I am also looking at <dtml-var REQUEST> which
gives me information I need.  I have searched the Zope Site and cannot
find help on this.  

2. Can I display individual parts of the the REQUEST results or do I
have to parse the results in an external method using python?

3. And then on another topic, can I create a product from a directory
tree in my Zope Server or do I have to create a product from the
beginning majorly because of the syntax used in creating a product?



Steve Drees wrote:
> I learned this one the hard way.
> Had a python method
> id: expireTime
> parameters: self
> body:
> t = self.ZopeTime() + (1.0/192.0) # 7.5 minutes in the future
> t = t.toZone('GMT')
> return t.strftime("%A, %d-%b-%Y %H:%M:%S GMT")
> ------------------------------------------------------
> Was trying the following
> <dtml-call "RESPONSE.setCookie('name', 'value', path='/',
> expires=expireTime)">
> This does NOT work.
> THe following works MUCH better
> <dtml-call "RESPONSE.setCookie('name', 'value', path='/',
> expires=expireTime())">
> --
> Steve Drees
> SysAdmin/Software Developer/Web Geek/Chief Bottle Washer
> "A problem well-stated is a problem half-solved."
> _______________________________________________
> Zope maillist  -  [EMAIL PROTECTED]
> **   No cross posts or HTML encoding!  **
> (Related lists -
> )

                      Rock and Rule
             Zope Rocks --
           Python Rules  --    
Thomas McMillan Grant Bennett      Appalachian State University
Computer Consultant III            University Library
Voice:  828 262 6587               FAX:    828 262 3001

Windows 95 is a 32-bit extension to a 16-bit patch for an 8-bit
operating system that was originally coded for a 4-bit microprocessor.
 - Chris Dunphy     Boot Magazine

Zope maillist  -  [EMAIL PROTECTED]
**   No cross posts or HTML encoding!  **
(Related lists - )

Reply via email to