Hi All, How can I do this with dtml? <select name="MODLEVEL" size="1"> <dtml-if expr="<dtml-var name="MODLEVEL"> == 1"> #I need an alternative to this. <option value="1" selected="selected">1</option> <option value="2"><2</option> Etc, etc. Hope someone can help. Jon
Jonathan Bowlas schrieb:
Hi All,
How can I do this with dtml?
<select name="MODLEVEL" size="1"> <dtml-if expr="<dtml-var name="MODLEVEL"> == 1"> #I need an alternative to this. <option value="1" selected="selected">1</option> <option value="2"><2</option> Etc, etc.
Hope someone can help.
No you cant. <dtml-var> means, unlike the name say really: dtml-print. See it like that and it will be clear. (Or just skip that DTML alltogether) Regards Tino
--On 20. Juni 2006 12:15:40 +0100 Jonathan Bowlas <me@jonbowlas.com> wrote:
Hi All,
How can I do this with dtml?
<select name="MODLEVEL" size="1"> <dtml-if expr="<dtml-var name="MODLEVEL"> == 1"> #I need an alternative to this. <option value="1" selected="selected">1</option> <option value="2"><2</option> Etc, etc.
Hope someone can help.
Is there a real need for you to use DTML instead of ZPT? -aj
Hi, no need for nested dtml : <select name="MODLEVEL" size="1"> <option value="1"<dtml-if expr="MODLEVEL == '1'"> selected</dtml-if>>1</option> <option value="2"<dtml-if expr="MODLEVEL == '2'"> selected</dtml-if>>2</option> </select> On 6/20/06, Jonathan Bowlas <me@jonbowlas.com> wrote:
Hi All,
How can I do this with dtml?
<select name="MODLEVEL" size="1"> <dtml-if expr="<dtml-var name="MODLEVEL"> == 1"> #I need an alternative to this. <option value="1" selected="selected">1</option> <option value="2"><2</option> Etc, etc.
Hope someone can help.
Jon
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
bounces+lsh=wo.cz@zope.org] On Behalf Of Jonathan Bowlas How can I do this with dtml?
<select name="MODLEVEL" size="1"> <dtml-if expr="<dtml-var name="MODLEVEL"> == 1"> #I need an alternative to this. <option value="1" selected="selected">1</option> <option value="2"><2</option> Etc, etc.
<dtml-if MODLEVEL> <select name="MODLEVEL:int" size="1"> <option value="1" <dtml-if expr="MODLEVEL == 1">SELECTED</dtml-if> >1</option> <option value="2" <dtml-if expr="MODLEVEL == 2">SELECTED</dtml-if> >2</option> Etc, etc. </dtml-if> Regards, JL.
participants (5)
-
Andreas Jung -
Jaroslav Lukesh -
Jonathan Bowlas -
Patrick Decat -
Tino Wildenhain