hello monks,
Is there a way to submit a form by just selecting something from a drop down menu?
Here is my code so far? What must ai cahnge?
@files = <../data/texts/*.txt>;
foreach (@files) {
$_ =~ s/.*[\/\\](.*)/$1/;
}
print start_form(-action=>"index.pl");
print p( {-align=>'center'}, font( {-size=>5, -color=>'Lime'}, 'ÃÃ
+¼Ã£Ã¯Ã² Ãõ÷ùöåëÃò êáé ÃáõìÃóéïò => ' ),
popup_menu( -name=>'select', -values=>
+\@files )), br();
print end_form();
$file = param('select') if param('select') or $file = $files[int(rand
+(@files))];
open(IN, "<../data/texts/$file") or die $!;
@data = <IN>;
close(IN);
$data = join("", @data);
$data =~ s/\n/\\n/g;
How can i be able to submit the form without the use of a button just by waiting for the user t select soemthignfrom the drop-down menu? Thnaks