[ Lennart Regebro wrote:]
On Wed, 23 Mar 2005 12:11:12 +0100 (CET), Jürgen Herrmann <Juergen.Herrmann@xlhost.de> wrote:
try something like this:
<option tal:content="district/district_name" tal:attributes="selected python:test(distname==district.district_name, 'selected', '')"></option>
That's a bit overly complicated. tal:attributes="selected python:distname==district.district_name" is enough.
as far as i remeber the selected attribute should only contain 'selected' if you'd like to be xhtml compliant. but hey, if your version works with the standard browsers, i'll also go for this version, cause it's much more readable... regards, juergen herrmann _______________________________________________________________________
XLhost.de - eXperts in Linux hosting <<
Juergen Herrmann Weiherweg 10, 93051 Regensburg, Germany Fon: +49 (0)700 XLHOSTDE [0700 95467833] Fax: +49 (0)721 151 463027 ICQ: 27139974 - IRC: #XLhost@quakenet WEB: http://www.XLhost.de