javascript or dreamweaver

Discussion in 'JavaScript' started by jbzcc, Nov 16, 2008.

  1. #1
    I need help in validating a name field so it will not accept letters alone. Using validate form in dreamweaver i was able to do that for numbers where it gives a trigger to accept numbers alone but i did not see where to do that for letters alone. In the code i see R isNum, is there any code i can use so it accepts letters alone. Or is there any simple javascript code i can use so the field takes letters alone.

    Below is simple java for letters not to be less than 3. Is there any thing simple like that i can use to say letters only?

    Code below

    if (document.form1.firstname.value.length < 3) {
    alert("Please enter a minimum of 3 letters for your name.");
    return false;
     
    jbzcc, Nov 16, 2008 IP