note
mkirank
Check out <a href='http://stein.cshl.org/WWW/software/CGI/cgi_docs.html'> CGI Docs </a> <br>
<br>
<code>
#!perl
use CGI qw(:standard);
use strict ;
use warnings;
my $query = new CGI;
print $query->header;
print start_html(-title=>"hello world", -bgcolor=>"#BOE0E6" );
my $js =<<JS;
<SCRIPT Language="javascript">
function check_answer()
{
if(document.hello.empcode.value==false)
{
alert("Please enter the Software");
document.hello.empcode.focus();
return false;
}
return true;
}
</SCRIPT>
JS
print "$js \n\n";
print $query->startform(-method=>"POST",-action=>"mycgi.cgi",-onSubmit=>'return check_answer()',-name=>'hello');
print $query->textfield(-name=>'empcode',
-size=>20,
-maxlength=>20);
print $query->submit(-name=>'submit',
-value=>'submit');
print $query->reset ;
print $query->endform;
</code>
437482
437482