CyCliC has asked for the wisdom of the Perl Monks concerning the following question:
how do I run the write_content function when the submit button has been pressedprint header( "text/html" ); print start_html(-title => "Bookshelf at Reddo Networks", -bgcolor => "#ffffff" ); print start_form(); print p("Document nr: ", textfield("doc_nr")); print p("Document name: ", textfield("doc_name")); print p("Author: ", popup_menu("author", \@authors)); print p(submit("DO"), reset("clear")); print end_form(), hr(); print_content(); print end_html; write_content(); sub print_content { open(DAT, "<doc_number.dat"); @all = <DAT>; foreach $b (@all){ print p($b); } close(DAT); } sub write_content { print p("tada"); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Executing a function on submit
by tadman (Prior) on Jul 30, 2001 at 14:44 UTC | |
|
Re: Executing a function on submit
by voyager (Friar) on Jul 30, 2001 at 18:58 UTC |