[Zope] IE fails to evaluate expression
J Cameron Cooper
jccooper at jcameroncooper.com
Tue Feb 17 17:23:31 EST 2004
Horak, Karl wrote:
> I have a library of documents arranged by topic, which are folders,
> and I wish to associate an Author property with each uploaded file.
> Author is a text box on the form that posts to this DTML method and
> topic is passed in the querystring. The following DTML works great
> with Netscape, Mozilla, and Opera but fails with IE on line 3 with a
> Key error. Any suggestions on how to make this browser independent?
> (I know, tell people to stop using IE was my first thought.) I am
> suspicious that IE is not handling _.getitem(file.filename,0) properly.
>
> <dtml-with expr="_.getitem(topic,0)">
> <dtml-call expr="manage_addFile(id='', file=file, title=short_title)">
> <dtml-call
> expr="_.getitem(file.filename,0).manage_addProperty('author', author,
> 'string')">
> </dtml-with>
IE has nothing to do with running this code (it's entirely server-side
-- Zope's responsibility) but it does need to pass all the parameters
right, which apparently it fails to do. I can't say exactly why, but you
can start debugging by printing out this request (<dtml-var REQUEST>
should do it) and seeing what's coming in. At a deeper level you can do
something similar with a tcp logger.
One guess: you seem to be mixing your parameter passing methods. I don't
recall any definitive statement on this in the specs, but I'm pretty
sure it's not explicitly supported, though in practice most browsers and
app servers don't mind. But IE may be having issues with a POST with URL
parameters.
--jcc
--
"He who fights with monsters should look to it that he himself does not become a monster. And when you gaze long into an abyss the abyss also gazes into you."
More information about the Zope
mailing list