I cannot figure out what I'm doing wrong. validateForm() does not seem to execute from an onsubmit. Here is validateForm()
function validateForm() {
    var amt = IsNumeric(document.forms["InvGenPay"]["Amount"].value);
    alert(amt);
    if (amt == false)
    {
        alert("placeholder to avoid scrolling.");
        return false;
    }
    else
    {
        return true;
    }
}
function IsNumeric(strString)
{
    //  check for valid numeric strings  
    var strValidChars = "0123456789.";
    var strChar;
    var blnResult = true;
    if (strString.length == 0) return false;
    //  test strString consists of valid characters listed above
    for (i = 0; i < strString.length && blnResult == true; i++)
    {
        strChar = strString.charAt(i);
        if (strValidChars.indexOf(strChar) == -1)
        {
            blnResult = false;
        }
    }
    if (0 > parseFloat(strString))
    {
        return false;
    }
    else
    {
        return blnResult;
    }
}
Here is the form with onsubmit:
<script type="text/javascript" language="JavaScript1.2">
document.write('<form name="InvGenPayDonation" action="'+PostURL+'" onsubmit="return validateForm();" method="POST">');
</script>
<input type='text' name='DonationAmount' value="0.00">
In honor of <span style="color: #FF0000"><br />
<input type='text' name='TransDesc' id='TransDesc' value="" >
<input type="submit" value="Next">
</form>
 
     
     
    