Hi Perlmonks.
Is there anyway to redirect the list of value in the drop down box into a perl script?
This perl script will read the value of the selection into a variable *input.
For eg the dropdown box contain 3 value :
Class 1
Class 2
Class 3
When the user choose the class 1... it will redirect to another perl script prog2.pl which will read this "Class 1" as the value.The handling program prog2.pl is fine.
But I'm confused about how to redirect each entry in the list to the perlscript.
This is part of my code where I create my dropdown box:
print << "end_file";
<HTML>
<HEAD>
<TITLE>Classes Design</TITLE>
</HEAD>
<BODY LEFTMARGIN=50 BGCOLOR="#E3FFE3" VLINK="blue" LINK="blue" ALINK="
+blue">
<FORM name="menuform">
<TABLE CELLSPACING=10>
<TR><TD>
<U><B>Visualization classes 3D model structures</B></U>
<P>Select classes
<BR><SELECT name="class">
end_file
&printClass();
sub printClass{
foreach my $element(@class){
if ($element ne ""){
print "<OPTION VALUE=\"$element\">";
print "$element\n";
} #end if element
} #end foreach
} #end printClass
Thanks so much.
Regards
gdnew
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.