in reply to CGI.pm popup_menu default problem

Your problem is most likely in a previous line where you are appending your $html var. Why are you doing this anyway? Oh well, your business. But an unclean HTML tag may be causing you problems since this looks OK. Does anyone else see a problem? This looks like a contextual HTML interpreter error due to bad HTML tags .
AgentM Systems or Nasca Enterprises is not responsible for the comments made by AgentM- anywhere.

Replies are listed 'Best First'.
(zdog) RE: (2) CGI.pm popup_menu default problem
by zdog (Priest) on Oct 05, 2000 at 21:30 UTC
    I think AgentM is right. I went to test this code:

    use strict; use CGI qw(:standard); my $html .= popup_menu( -name=>'col_id', -values=>[1,2], -default=>2, -labels=>{1=>'Ali',2=>'Baba'}, ); print $html;

    And here is the output I got:

    <SELECT NAME="col_id"> <OPTION VALUE="1">Ali <OPTION SELECTED VALUE="2">Baba </SELECT>
    I assume this is what you wanted so the error may not be in the bit of code you provided.

    Zenon Zabinski | zdog | zdog7@hotmail.com