[Zope] problem with dtml-if

Anders Holmbech Nielsen ahn@integrator.dk
Thu, 30 Mar 2000 10:08:52 +0200


hi,

I have this code in a dtml method called "test":

<HTML><body bgcolor=#ffffff>

<form action="test" method="get">

<SELECT NAME="day">
	<dtml-in 
"(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26 
,27,28,29,30,31)">
		<OPTION VALUE="<dtml-var sequence-item>"<dtml-if 
"_['sequence-item'] == day"> SELECTED</dtml-if>>
			<dtml-var sequence-item>
		</OPTION>
	</dtml-in>
</SELECT>

<input type="SUBMIT" name="SUBMIT" value="go">
</FORM>
</BODY></HTML>

It should "remember" the day selected and choose that as the default 
when making the select box. But for some reason the sentence:
<dtml-if "_['sequence-item'] == day"> SELECTED</dtml-if>

Doesn't work. I have also tried ... == _[day] ... == 'day'
...and a lot of other stuff but with no positive result.

I start the page with zope:8080/test?day=1

Regards

-------------------------------------------------
Anders Holmbech Nielsen | Tlf:  (+45) 70 22 56 00
Software Engineer       | Fax:  (+45) 70 22 57 00
Integrator Uniware A/S  | http:/www.integrator.dk