[ZWeb] Highliting data from multiple selection list
Mike Tran
mtran@shufflemasterrd.com
Tue, 5 Mar 2002 14:11:57 -0700
Does anyone know how to highlite data from a multiple selection list?
I have a method called <agency_lookup> and a selection list
called "jurisdiction" . The "agency_lookup" method display all the
agency_names in my agency table. I also have a field called
agency_selected. Agency_selected is a string in the DB that store all the
agency name(s) that the user have selected.
What i want to do is to highlite all the agency_name that are in the
agency_selected record. This is what i have so far but Zope does not like:
<dtml-if "agency_selected in agency_name">. agency_selected is defined.
Maybe just a syntax error. Can someone help please? I appreciate any
suggestions.
<select name="jurisdiction:list" size="6" multiple>
<dtml-in agency_lookup>
<dtml-if "agency_selected in agency_name">
<option value="<dtml-var agency_name>" selected><dtml-var
agency_name></option>
<dtml-else>
<option value="<dtml-var agency_name>"><dtml-var agency_name></option>
</dtml-if>
</dtml-in>
</select>
Thanks,
Mike