I have a cgi script which produces three fields and an image buttion in my html page.
The each field is produced like ....
print "\n\nYour Interest:<br>\n";
print $query->popup_menu(
-name=>'Interest',
-values=>['','A','B','C','D','E','F','G','H'],
-default=>'Please Select',
-labels=>\%labels);
and the image button is...
print "\n\n";
print $query->image_button(
-name=>'paypal',
-src=>'https://www.paypal.com/en_US/i/btn/x-click-butcc.gif',
-align=>'LEFT');
I want to trigger validation of the users action when a value is selected or the button is clicked. Then validation I am using is like .....
if($int eq "")
{
print "Please select your interest";
}
else
{
if($loc eq "")
{
print "Please select your area";
....
etc, etc.
The validation works ok but I can't find out how to get the validation to 'fire' at the correct time. This is a doddle in javascript :-)
Can anyone help?
Many thanks