Nik has asked for the wisdom of the Perl Monks concerning the following question:
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@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;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Submit a form by just selecting something from a drop down menu
by jZed (Prior) on May 20, 2004 at 17:09 UTC | |
|
Re: Submit a form by just selecting something from a drop down menu
by halley (Prior) on May 20, 2004 at 16:17 UTC | |
|
Re: Submit a form by just selecting something from a drop down menu
by Belgarion (Chaplain) on May 20, 2004 at 16:18 UTC | |
|
Re: (OT) Submit a form by just selecting something from a drop down menu
by Anonymous Monk on May 20, 2004 at 16:54 UTC | |
| |
| |
|