in reply to Adding attributes to select list options in CGI.pm popup_menu?
I want to replicate that -title=> behaviour in popup_menu()
The manual is very clear http://search.cpan.org/dist/CGI/lib/CGI.pm#CREATING_A_POPUP_MENU
#!/usr/bin/perl -- use CGI; print CGI->popup_menu( -values => ['a', 'b'], -labels => {'a', 'labela', 'b', 'labelb'}, -attributes => { 'a' => { title => 'titlea' }, 'b' => { title => 'titleb' }, }, ); __END__ <select name="" > <option title="titlea" value="a">labela</option> <option title="titleb" value="b">labelb</option> </select>
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Adding attributes to select list options in CGI.pm popup_menu?
by backedge (Initiate) on Jun 30, 2011 at 13:59 UTC |