in reply to display new options based on checkbox inputs
Hope this will help for anyone looking in the future.print header; &load($cgi); sub load() { $cgi = shift; if (!$cgi->param('submit')) { $cgi=&showhtml($cgi); exit; } <....carry on with other task.....> } sub showhtml() { my $cgi=shift; print $cgi->start_html(); print $cgi->checkbox(-name="1",values=>"1",-onClick=>"this.form.submi +t()),checkbox(-name="2",values=>"2",-onClick=>"this.form.submit()); my $a=$cgi->param("1"); my $b=$cgi->param("2"); if($a) { <show textbox;> } if($b) { <show textbox;> } print $cgi->submit(-name=>'submit',-value=>'submit'); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: display new options based on checkbox inputs
by Anonymous Monk on Jul 11, 2014 at 10:37 UTC |