------------------------------------------------ On Fri, 21 Feb 2003 10:04:54 -0500, Hendricks Paul D A1C 27 IS/INYS <[EMAIL PROTECTED]> wrote:
> Hiya. > I'm doing maintenance on a perl/cgi script that vaguely resembles most of > the perl I've seen, but seems to have been written by a monkey on drugs. > The problematic line I have is this: > &Library::PrintSelectBox("flat-file-containing-options", > "name-of-select-box", "default value", > "arcane-null-value","role-of-user-accessing-page" "Library" is not a standard Perl like module name, do you have a Library.pm, etc. that is being loaded? aka something written in house by whomever... as an aside you shouldn't use & unless you need them. > I need a label to pop up with a correlative value (also stored in a > flat-file) whenever a value in the select box is highlighted. > I've tried Javascript with no luck. > Is there a Perl alternative for this kind of function? I am not sure what "label pop up" means, but it sure sounds client side to me, which means you will have to use a client side scripting language (such as JavaScript). Perl (with CGI) is 99.99% of the time server side. But if your flat file is stored server side, then you will most likely need to either include the file in the html (with javascript in it) or use a CGI to print the javascript converted flat file. > Am I just a moron? Yet to be seen ;-)..... > And just who in the hell writes a select box like that for web-apps, anyway? Actually now that I have written all of that, I think I get it... The values you are passing to the sub need to be replaced with the actual values...aka you are passing "flat-file-containing-options" needs to be replaced by a path with a file containing the values (your flat file)... Then presumably the sub will translate that flat file into the name/value pairs seen in the form. You will need to look at the docs for Library.pm or whatever module contains the real implementation for PrintSelectBox. Then pass it your values, rather than the description of what it is expecting to receive. Essentially your PrintSelectBox is just a wrapper around printing the HTML select box, using a flat text file to specify the contents of said select box, including the name, a default value, and who knows what arcane-null, etc. is. Though it doesn't seem to have much sanity checking. http://danconia.org -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]