I have a small script in perl. Within the script there is a 'form'. Heres what the form looks like:
sub print_form {
my ($tt, $idnum) = @_;
print "<CENTER>\n";
print "<FORM METHOD='POST' ACTION='/cgi/thisscript.pl'>\n";
print " <INPUT type='hidden' name='idnum' value='$idnum' />\n";
print " <INPUT type='hidden' name='rain' value='$ttprefix' />\n";
print " <LABEL FOR='pin'>label 1</LABEL>\n";
print " <SELECT name='pin'>\n";
my $profiles = $tt->get_profile_urls;
for my $pin (keys %$profiles){
print " <OPTION value='$pin'>$profiles->{$pin}{name} ($pin)</OPTION>\n";
}
print " </SELECT>\n";
print " <BR />\n";
print " <LABEL FOR='invid'>Select the qouta</LABEL>\n";
print " <SELECT name='invid'>\n";
my $qouta = $tt->get_qouta;
for my $invid (sort { $a <=> $b } keys %$qouta){
my ($name, $pren) = ($qouta->{$invid}{name}, $qouta->{$invid}{pren});
print " <OPTION value='$invid'>$name ($pren)</OPTION>\n";
}
print " </SELECT>\n";
print " <BR />\n";
print " <LABEL FOR='qty'>qouta quantity</LABEL>\n";
print " <INPUT type='text' name='qty' value='$atom' />\n";
print " <BR />\n";
print " <INPUT type='submit' value='submit'/>\n";
print "</FORM>\n";
print "</CENTER>\n";
}
Im trying to loop it so that for example a javascript function (on the same page) would automatically click the 'submit' button # of times.
Is it possible to have javascript 'automatically' click on the submit function?
I understand this is possible in Userscripts with grease monkey although I'd like to be able to do this all on the webpage.