Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
sub do_something() {
#code here
}
my $action = do_something();
print qq(<form action="$action">);
<form action="myscript.pl">
<input type=hidden name=com value=[b]3[/b]>
<input type=text name=qty>
<input type=submit>
</form>
in the script:
my %coms = (
1 => \&foo,
2 => \&bar,
[b]3[/b] => \&order
);
my $command = param('com') || 0;
my $qty = param('qty') || 0;
$coms{$command}->($qty);
sub order {
my $parameter = shift
blah blah
}
<script>
function do_something() {
window.alert ('doing something?');
return true;
}
</script>
<!-- Set an onSubmit function in your form -->
<form onSubmit="do_something()" action="script.pl">
<!-- form contents -->