Problem with JavaScript validation of form submission

by "David Clapper" <dclapper(at)clioassociates.com>

 Date:  Wed, 30 May 2001 12:31:07 -0700
 To:  hwg-techniques(at)hwg.org
  todo: View Thread, Original

Hello all,

Please take a look at the following page:
http://63.241.178.185/Pages/distributorsNew.htm

I have put some JavaScript code (copy below) to validate the
that the user has checked a radio button.  When the user clicks
on the map without checking one of the buttons, the code pops
up the alert(), but it then executes the target script anyway,
despite the 'return false';

Anyone have any ideas how to make it NOT execute the script under
the above conditions?  TIA ... .

David Clapper

-------------
Javascript:
-------------
	function validateForm() {
	if (!(document.mapForm.ProductLine[0].checked || document.mapForm.ProductLine[1].checked))
{
		alert("You must choose either 'Life Science Products' or 'All
Other Products'");
		return false;
		}
	}

HWG hwg-techniques mailing list archives, maintained by Webmasters @ IWA