The_Dude1,
To demonstrate this working, I have created the following PERL script:
Code:
#!c:/perl/bin/Perl.exe
use CGI qw(:standard);
print "Content-type: text/html\n\n";
$PayMethod = param('PAYME');
print <<EOF;
<html><head><title>Test</title></head>
<body><select name="Method" onchange="window.location=('/cgi-bin/select.pl?PAYME='+this.options[this.selectedIndex].value)">
<option value="Other" >Other</option>
<option value="NoChex" >NoChex</option>
<option value="Cheque">Cheque</option>
</select>
EOF
if( $PayMethod eq "NoChex" )
{
print "NoChex method of payment was selected\<BR\>\n";
}
elsif( $PayMethod eq "Cheque" )
{
print "Cheque mehtod of payment was selected\<BR\>\n";
}
print <<EOF;
</body>
EOF
Try copying this sciprt into a file called select.pl in your cgi-bin directory. You may need to change the initial line to the correct path for your installation of PERL.
Initially the script provides you with a base page, when the drop down lick is changed, the script is recalled passing the PAYME parameter back. The value of PAYME is checked and the message is switched. There is no reason why this message should be a whole HTML page or a browser redirect message. Other processing, like the sending of an EMail can also be done.
I hope this helps.