RE: [Zope] FW: Comparing variables
My guess is one of your variables is a string, the other an int. Do something like: <dtml-if "_.string.atoi(seqnum) == copyitem"> to convert your sequence item or copyitem, which ever is the string, to an int. Scott -----Original Message----- From: Sheree Beaudette [mailto:sheree@psouth.net] Sent: Monday, January 07, 2002 3:01 PM To: zope@zope.org Subject: [Zope] FW: Comparing variables
I have a form that sets the variable copyitem, a number from 1 to ...
(an
integer)
<input type="text" name="copyitem">
Once I submit the form
I want copyitem to be compared with a sequence-number from a SQL query, code as follows
<dtml-in clsqGetNotes> <dtml-let seqnum=sequence-number> <dtml-if "seqnum == copyitem"> do something true <dtml-else> do something false </dtml-if> </dtml-let> </dtml-in>
Since I've written these variables to the screen I know that they're equal, yet they still do the 'do something false' .
I hope it's something easy I've overlooked. I didn't know if there were type differences that I need to convert. How do I convert these? Do I need a python script? I'm new to Python so can you help???
Thanks in advance!
_______________________________________________ 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 ) The information contained in this email message may be privileged and is confidential information intended only for the use of the recipient or any employee or agent responsible for delivering it to the intended recipient. Any unauthorized use, distribution or copying of this information is strictly prohibited and may be unlawful. If you have received this communication in error, please notify the sender immediately and destroy the original message and all attachments from your electronic files.
participants (1)
-
Meilicke, Scott