Hi, I'm a bit confused. I have a Website with a select field. You can choose numbers between 7 an -7 (<option value="-7">). If the number is positive everything is fine, but if it is negative Zope behaves strange. First I convert the string "-7" into an integer publishRange = int(publishRange) and then want to know whether it is positive or negative, but if publishRange < 0: doesn't react to it (if publishRange > 0: does, if publishRange is positive). What am I doing wrong. MfG Steffen -- Manche Maenner bemuehen sich ein ganzes Leben lang, das Wesen einer Frau zu verstehen. Andere befassen sich mit weniger schwierigen Dingen, z.B. der Relativitaetstheorie.
There's not much to go on here, but my top two guesses are: 1. There are two elements in your form with the name publishRange 2. Something else is operating on the value of publishRange in your target Try dumping out REQUEST at a couple different places in your target... it may be quite instructive. If that doesn't help, try posting a minimal case where you can see the problem. HTH, Dylan At 05:29 PM 11/17/2002 +0100, you wrote:
Hi,
I'm a bit confused.
I have a Website with a select field. You can choose numbers between 7 an -7 (<option value="-7">). If the number is positive everything is fine, but if it is negative Zope behaves strange.
First I convert the string "-7" into an integer
publishRange = int(publishRange)
and then want to know whether it is positive or negative, but
if publishRange < 0:
doesn't react to it (if publishRange > 0: does, if publishRange is positive).
What am I doing wrong.
MfG Steffen -- Manche Maenner bemuehen sich ein ganzes Leben lang, das Wesen einer Frau zu verstehen. Andere befassen sich mit weniger schwierigen Dingen, z.B. der Relativitaetstheorie.
_______________________________________________ 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 )
participants (2)
-
Dylan Reinhardt -
Steffen Hausmann