[Zope] sessions in an iframe
henk laloli
ticino at hccnet.nl
Mon Jun 12 03:46:44 EDT 2006
Hello,
I am using a session object to store a query string. The query string is
used for a reload of the same query with two parameters changing their
value when the user reorders a table column. This works fine under Zope
2.9.3 in Mozilla. The page on which this query string is stored en taken
up again is in an iframe. The iframe html resides on a Zope server, the
parents website's computer is a different one, but in the same domain.
Now under Firefox the session object still can be referenced, but in
Internet Explorer the page in the iframe does not reference the session
object properly. It once records it and then adds the changing
parameters to it,doubling them and making the SQL query run into an
error. The url is:
http://www.volkstellingen.nl/nl/gemeenten/ where after a search you can
reorder table columns by clicking on the headers.
The problem does not occur in IE when the page is used on its own, only
when it is used in an iframe. The question then is: can it be that IE
restricts the session behaviour in this situation? How can I solve it?
Here is the code in a PythonScript, that is called in the search
results html page.
directionDict = {'gemeente':'gm_direction','provincie':'prov_direction',
'begindatum':'bd_direction','einddatum':'ed_direction','amsterdamse_code':'ac_direction'}
if request.SESSION.has_key('firstquery'):
if request.has_key('sort'): #user sorts column without a new query
if request.richting == 'ASC':
value = directionDict[request.sort]
request.set(value, 'DESC')
#put all other columns on ASC
for k,v in directionDict.items():
if k != request.sort:
request.set(v, 'ASC')
else:
value = directionDict[request.sort]
#put all columns on ASC
for v in directionDict.itervalues():
request.set(v, 'ASC')
else: #user does a new query, session object exists
del request.SESSION['firstquery']
query = request.QUERY_STRING
first = request.SESSION['firstquery']=query
for v in directionDict.itervalues():
request.set(v, 'ASC')
else: #first query
query = request.QUERY_STRING
first = request.SESSION['firstquery']=query
for v in directionDict.itervalues():
request.set(v, 'ASC')
--
Henk Laloli
More information about the Zope
mailing list