You are viewing a plain text version of this content. The canonical link for it is here.
Posted to embperl@perl.apache.org by "Erich L. Markert" <em...@pace.edu> on 2000/06/13 17:34:42 UTC

Re: help displaying a select list

Gerald Richter wrote:
> 
> >
> Here is what I would do
> 
> [- @STATE_ABBREVIATIONS = sort keys %STATES -]
> <SELECT NAME="state">
>         <OPTION VALUE="[+ $abr=$STATE_ABBREVIATIONS[$row]+]">[+
> $STATES{$abr}{name}+]</OPTION>
> </SELECT>

A while ago I was sent this solution to display a complex hash in a
select list.

Works like a champ, however in my web error log I'm getting warnings
about $abr not being previously initialized.  I've tried initializing it
by setting it to zero just prior to each select as such:

[- $abr = 0; -]<SELECT.....>.....

but I continue to receive this error.  I know it's just a warning but is
there anyway to get rid of this warning?
--
__________________________________________________________
Mr. Erich L. Markert                     emarkert@pace.edu
Computer Learning Center		 TEL (914)422-4328
Pace University
1 Martine Ave
White Plains, New York 10606-1932

Those who do not understand Unix are condemned to reinvent it, poorly.
                -- Henry Spencer

RE: help displaying a select list

Posted by Gerald Richter <ri...@ecos.de>.
>
> but I continue to receive this error.  I know it's just a warning but is
> there anyway to get rid of this warning?

This warning comes from the end of the list. There must be one undefined
element, because that is the one that stops the list. So at the moment there
is no chance to get rid of it.

Gerald


-------------------------------------------------------------
Gerald Richter    ecos electronic communication services gmbh
Internetconnect * Webserver/-design/-datenbanken * Consulting

Post:       Tulpenstrasse 5         D-55276 Dienheim b. Mainz
E-Mail:     richter@ecos.de         Voice:    +49 6133 925151
WWW:        http://www.ecos.de      Fax:      +49 6133 925152
-------------------------------------------------------------