>>>>> "JMRM" == John M Rathbun MD <jmrath...@bellsouth.net> writes:

  JMRM> I'm an amateur programmer trying to convert some of my old BASIC
  JMRM> programs to run in a browser so people don't have to download and
  JMRM> install software. I'm having a problem with my current project because
  JMRM> CGI.pm is generating some funny code when I try to evoke a scrolling
  JMRM> list box.

  JMRM> Here's the relevant evocation:

  JMRM>    print scrolling_list(-name => 'choose',-values=>@terms,-size=>254);

when i run this one liner it looks ok:

perl -MCGI=scrolling_list -le 'print scrolling_list( -name => 
'z',-values=>[1,2,3],-size=>3)'
<select name="z"  size="3">
<option value="1">1</option>
<option value="2">2</option>
<option value="3">3</option>
</select>


try to show an example with shorter data that has the same error. i also
ran the same one liner with 1..254 for the data and it seems to work as
well. i would then suspect you have some other problem in your code that
we can see. try to created a complete but short program that shows this
problem. in doing so you may even find the bug. i doubt it is in CGI.pm
as that module has been around forever and is considered very solid.

also you can easily generate that html by yourself with a simple loop or
a templater. if you can get cgi.pm to work, do that yourself.

also note that the html i saw generated is somewhat different than what
you want. it has both values and labels (which are the same here)
whereas yours only shows the labels and isn't proper html anymore.

uri

-- 
Uri Guttman  ------  u...@stemsystems.com  --------  http://www.sysarch.com --
-----  Perl Code Review , Architecture, Development, Training, Support ------
---------  Gourmet Hot Cocoa Mix  ----  http://bestfriendscocoa.com ---------

-- 
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to