Re: [Zope] selected in select lists

2005-10-17 Thread Chris Withers
Garry Saddington wrote: This code does not work;-). That, in itself, as an argument for using ZPT. The reason it doesn't work is probably because of some subtlety in name lookup of your DTML method. Showing DTML to other people, say, on a mailing list, is much harder to grok than a ZPT,

Re: [Zope] selected in select lists

2005-10-17 Thread Chris Withers
Garry Saddington wrote: The comparison is dynamic. Ah, so thisgroupabrev comes from the request? See? I could never have known that from JUST reading the DTML. In ZPT, it would have been request/thisgroupabrev and all would have been clear. The user selects an option, that option is

Re: [Zope] selected in select lists

2005-10-14 Thread Chris Withers
Garry Saddington wrote: DTML: select name=groupabbrev dtml-in getpastoralgroups option value=dtml-var thisgroupabbrev dtml-if expr=groupabbrev==_.str(thisgroupabbrev) selected/dtml-if dtml-var thisgroupabbrev/option /dtml-in /select And just for comparison, here's the ZPT: select

Re: [Zope] selected in select lists

2005-10-14 Thread Garry Saddington
Chris Withers wrote: Garry Saddington wrote: DTML: select name=groupabbrev dtml-in getpastoralgroups option value=dtml-var thisgroupabbrev dtml-if expr=groupabbrev==_.str(thisgroupabbrev) selected/dtml-if dtml-var thisgroupabbrev/option /dtml-in /select And just for comparison, here's

Re: [Zope] selected in select lists

2005-10-14 Thread Tino Wildenhain
Am Freitag, den 14.10.2005, 20:03 +0100 schrieb Garry Saddington: Chris Withers wrote: Garry Saddington wrote: DTML: select name=groupabbrev dtml-in getpastoralgroups option value=dtml-var thisgroupabbrev dtml-if expr=groupabbrev==_.str(thisgroupabbrev) selected/dtml-if

Re: [Zope] selected in select lists

2005-10-14 Thread Garry Saddington
Tino Wildenhain wrote: Am Freitag, den 14.10.2005, 20:03 +0100 schrieb Garry Saddington: Chris Withers wrote: Garry Saddington wrote: DTML: select name=groupabbrev dtml-in getpastoralgroups option value=dtml-var thisgroupabbrev dtml-if

Re: [Zope] selected in select lists

2005-10-14 Thread David H
Garry Saddington wrote: Tino Wildenhain wrote: Am Freitag, den 14.10.2005, 20:03 +0100 schrieb Garry Saddington: Chris Withers wrote: Garry Saddington wrote: DTML: select name=groupabbrev dtml-in getpastoralgroups option value=dtml-var thisgroupabbrev dtml-if

[Zope] selected in select lists

2005-10-12 Thread Garry Saddington
I have a variable called 'groupabbrev' in the REQUEST. I am trying to automatically select an option in a select list based on this variable. I have tried this code and many others, and many googles but have not found anything that works. Can anyone see what I am doing wrong? select

Re: [Zope] selected in select lists

2005-10-12 Thread J Cameron Cooper
Garry Saddington wrote: I have a variable called 'groupabbrev' in the REQUEST. I am trying to automatically select an option in a select list based on this variable. I have tried this code and many others, and many googles but have not found anything that works. Can anyone see what I am doing

Re: [Zope] selected in select lists

2005-10-12 Thread Garry Saddington
J Cameron Cooper wrote: Garry Saddington wrote: I have a variable called 'groupabbrev' in the REQUEST. I am trying to automatically select an option in a select list based on this variable. I have tried this code and many others, and many googles but have not found anything that works. Can

Re: [Zope] selected in select lists

2005-10-12 Thread Garry Saddington
Nicolas Gouzy wrote: I think this code works : select name=groupabbrev dtml-in getpastoralgroups option value=dtml-var expr=_['sequence-item'] dtml-if expr=groupabbrev==_['sequence-item'] selected/dtml-if dtml-var expr=_['sequence-item']/option /dtml-in /select -- Nicolas Gouzy [EMAIL

Re: [Zope] selected in select lists

2005-10-12 Thread J Cameron Cooper
Garry Saddington wrote: J Cameron Cooper wrote: Garry Saddington wrote: I have a variable called 'groupabbrev' in the REQUEST. I am trying to automatically select an option in a select list based on this variable. I have tried this code and many others, and many googles but have not found

Re: [Zope] selected in select lists

2005-10-12 Thread J Cameron Cooper
Garry Saddington wrote: Nicolas Gouzy wrote: I think this code works : select name=groupabbrev dtml-in getpastoralgroups option value=dtml-var expr=_['sequence-item'] dtml-if expr=groupabbrev==_['sequence-item'] selected/dtml-if dtml-var expr=_['sequence-item']/option /dtml-in /select --

Re: [Zope] selected in select lists

2005-10-12 Thread Garry Saddington
J Cameron Cooper wrote: Garry Saddington wrote: Nicolas Gouzy wrote: I think this code works : select name=groupabbrev dtml-in getpastoralgroups option value=dtml-var expr=_['sequence-item'] dtml-if expr=groupabbrev==_['sequence-item'] selected/dtml-if dtml-var