<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META content="MSHTML 5.00.3314.2100" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2>There is probably a more elegant solution, but this might
work:</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2>Create a dictionary on the user_folder (a property field on
this folder is stored in RAM for fast access).</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>Store the users HTTP_X_FORWARDED_FOR ip address as the
'key' for the dictionary (display REQUEST and you will see that this field
doesn't change if the user spawns several browsers from the same pc/internet
connection, however it will change if the user comes from different pc/internet
connections). </FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>You can then see if any given user is already registered, and
you can store a list containing the fields you want to save as the 'value'
for the dictionary key.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2>HTH</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2>Jonathan</FONT></DIV>
<BLOCKQUOTE
style="BORDER-LEFT: #000000 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A href="mailto:Michael.Rinner@cellzome.com"
title=Michael.Rinner@cellzome.com>Michael.Rinner@cellzome.com</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A href="mailto:zope@zope.org"
title=zope@zope.org>zope@zope.org</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> March 12, 2004 9:52 AM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> [Zope] Keeping data throughout a
session</DIV>
<DIV><BR></DIV><BR><FONT face=sans-serif size=2>Hi,</FONT> <BR><BR><FONT
face=sans-serif size=2>I've got the following problem:</FONT> <BR><BR><FONT
face=sans-serif size=2>I want to keep several choices users make during a site
visit persistent in memory during their session. Not all of those fields
appear on each page or are needed, but the values should still be available
all the time so they can be used for various selections.</FONT> <BR><BR><FONT
face=sans-serif size=2>Now I could simply use hidden input fields and carry
the values over and over from one page to another, but that seems quite an
awkward way to do this. So I store them as Session data, which works fine so
far except for if a user opens several browser windows, which however happens
quite often. In that case, changes done in one window affect the selection in
another window, as there is only one shared session object obviously.</FONT>
<BR><BR><FONT face=sans-serif size=2>Does anyone have an idea what the best
way would be to handle this? I'd like to automatically keep values valid that
are selected at random times for seperate windows and their subwindows,
without affecting values stored for other windows. And all of that hopefully
without major changes to various places in the DTML and script files...</FONT>
<BR><BR><FONT face=sans-serif size=2>Thanks in advance,</FONT> <BR><BR><FONT
face=sans-serif size=2>Michael Rinner</FONT>
<P>
<HR>
<P></P>_______________________________________________<BR>Zope maillist
-
Zope@zope.org<BR>http://mail.zope.org/mailman/listinfo/zope<BR>**
No cross posts or HTML encoding! **<BR>(Related lists -
<BR> http://mail.zope.org/mailman/listinfo/zope-announce<BR> http://mail.zope.org/mailman/listinfo/zope-dev
)<BR></BLOCKQUOTE></BODY></HTML>