I have a search form with 3 different fields and need to verify that there is a value in at least one of them. I know that <dtml-if expr="some_field"> will test for one, but how do I determine if anyone of the three contains a value? I've checked the how-to's and Google but can't find anything. I'm using ZODB. TIA, Michael
Michael wrote:
I have a search form with 3 different fields and need to verify that there is a value in at least one of them. I know that <dtml-if expr="some_field">
Ug! Why is your search orm processign written in DTML?! Still, if you must torture yourself... <dtml-if "somefield or some_other_field or a_third_field"> ...will do what you want. cheers, Chris
Michael wrote:
Thanks Chris, I am a non-programmer, who knew html and a little javascript, that was drawn to Zope because DTML was a tag based language. (Zope is a little cheaper than Cold Fusion) I'm trying to learn though. I thought I had tried using an "or" in a dtml-if statement before and it didn't work. Guess I was wrong. Anyway, thanks again for the advice, it works great. Michael PS. If you know of any schools, org's, or people for that matter in Northern Colorado who teach Python, I would be very interested. On Thursday 08 August 2002 02:27 am, Chris Withers wrote:
I have a search form with 3 different fields and need to verify that there is a value in at least one of them. I know that <dtml-if expr="some_field">
Ug! Why is your search orm processign written in DTML?!
Still, if you must torture yourself...
<dtml-if "somefield or some_other_field or a_third_field">
...will do what you want.
cheers,
Chris
Your're in luck, Mark Lutz teaches Python classes in Longmont/Boulder. Very worthwhile to get a jump start w/Python: http://home.rmi.net/~lutz/mytrain.html hth, -Casey On Thursday 08 August 2002 04:44 pm, Michael wrote:
Michael wrote:
Thanks Chris,
I am a non-programmer, who knew html and a little javascript, that was drawn to Zope because DTML was a tag based language. (Zope is a little cheaper than Cold Fusion) I'm trying to learn though. I thought I had tried using an "or" in a dtml-if statement before and it didn't work. Guess I was wrong. Anyway, thanks again for the advice, it works great.
Michael
PS. If you know of any schools, org's, or people for that matter in Northern Colorado who teach Python, I would be very interested.
On Thursday 08 August 2002 02:27 am, Chris Withers wrote:
I have a search form with 3 different fields and need to verify that there is a value in at least one of them. I know that <dtml-if expr="some_field">
Ug! Why is your search orm processign written in DTML?!
Still, if you must torture yourself...
<dtml-if "somefield or some_other_field or a_third_field">
...will do what you want.
cheers,
Chris
_______________________________________________ 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 )
Thanks Casey, I've been going through Alan Gauld's tutorial, and on Mark's website, he said that his book "Learning Python" kind of goes along with the basic course. I'll get his book first and then talk to him about about a class. Since it's only three days long, I think I may need to prepare a little more first. Michael On Thursday 08 August 2002 03:24 pm, Casey Duncan wrote:
Your're in luck, Mark Lutz teaches Python classes in Longmont/Boulder. Very worthwhile to get a jump start w/Python:
http://home.rmi.net/~lutz/mytrain.html
hth,
-Casey
On Thursday 08 August 2002 04:44 pm, Michael wrote:
Michael wrote:
Thanks Chris,
I am a non-programmer, who knew html and a little javascript, that was drawn to Zope because DTML was a tag based language. (Zope is a little cheaper than Cold Fusion) I'm trying to learn though. I thought I had tried using
an
"or" in a dtml-if statement before and it didn't work. Guess I was wrong. Anyway, thanks again for the advice, it works great.
Michael
PS. If you know of any schools, org's, or people for that matter in
Northern
Colorado who teach Python, I would be very interested.
On Thursday 08 August 2002 02:27 am, Chris Withers wrote:
I have a search form with 3 different fields and need to verify that there is a value in at least one of them. I know that <dtml-if expr="some_field">
Ug! Why is your search orm processign written in DTML?!
Still, if you must torture yourself...
<dtml-if "somefield or some_other_field or a_third_field">
...will do what you want.
cheers,
Chris
_______________________________________________ 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 )
I believe he actually gives you this book as part of the class, along with a workbook. Just in case you haven't already bought it ;^) -Casey On Thursday 08 August 2002 06:18 pm, Michael wrote:
Thanks Casey,
I've been going through Alan Gauld's tutorial, and on Mark's website, he said that his book "Learning Python" kind of goes along with the basic course. I'll get his book first and then talk to him about about a class. Since it's only three days long, I think I may need to prepare a little more first.
Michael
On Thursday 08 August 2002 03:24 pm, Casey Duncan wrote:
Your're in luck, Mark Lutz teaches Python classes in Longmont/Boulder. Very worthwhile to get a jump start w/Python:
http://home.rmi.net/~lutz/mytrain.html
hth,
-Casey
On Thursday 08 August 2002 04:44 pm, Michael wrote:
Michael wrote:
Thanks Chris,
I am a non-programmer, who knew html and a little javascript, that was drawn to Zope because DTML was a tag based language. (Zope is a little cheaper than Cold Fusion) I'm trying to learn though. I thought I had tried using
an
"or" in a dtml-if statement before and it didn't work. Guess I was wrong. Anyway, thanks again for the advice, it works great.
Michael
PS. If you know of any schools, org's, or people for that matter in
Northern
Colorado who teach Python, I would be very interested.
On Thursday 08 August 2002 02:27 am, Chris Withers wrote:
I have a search form with 3 different fields and need to verify that there is a value in at least one of them. I know that <dtml-if expr="some_field">
Ug! Why is your search orm processign written in DTML?!
Still, if you must torture yourself...
<dtml-if "somefield or some_other_field or a_third_field">
...will do what you want.
cheers,
Chris
_______________________________________________ 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 )
_______________________________________________ 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 )
Michael wrote:
I am a non-programmer, who knew html and a little javascript, that was drawn to Zope because DTML was a tag based language. (Zope is a little cheaper than Cold Fusion) I'm trying to learn though.
Hehe, 3 years of DTML experience have taught me that tag based languages are only useful if you're a masochist ;-) Either string substitution (a lá C, C++ and python) or attribute based languages such as ZPT seem to gel a lot better with me... cheers, Chris
participants (3)
-
Casey Duncan -
Chris Withers -
Michael