At 1:01 PM +0200 5/3/02, Gerald Richter - ecos gmbh wrote:
>Yes, that's true. If this could be the case you need to use a loop, which
>isn't much more to write or wait until I have change Embperl to handle this
>more smart:
>
><select name="person.id:[+ $i +]" onchange="AuthorMenu(this, [+ $i +])">
><option value="">None</option>
><option value="-1">Other...</option>
><option value="">---</option>
>[$ while ($rec = $set -> Next) $]
><option value="[+ $rec->{id} +]">[+ $rec->{sortkey} +]</option>
>[$ endwhile $]
></select>

The work around is clear enough, I just wanted to point out that 
there was an unexpected side effect of Axel's solution.  In this 
particular instance it happens to be another one of those cases where 
a simple while loop doesn't work for me--I'm generating several 
instances of that menu, so instead I end up doing this:

[- $j = 0; -]
[$ while ($set->[$j]{id}) $]
        <option value="[+ $set->[$j]{id} +]">[+ $set->[$j]{sortkey} +]</option>
        [- ++$j -]
[$ endwhile $]

-- 

Kee Hinckley - Somewhere.Com, LLC
http://consulting.somewhere.com/
[EMAIL PROTECTED]

I'm not sure which upsets me more: that people are so unwilling to accept
responsibility for their own actions, or that they are so eager to regulate
everyone else's.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to