Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 08/13/2014 in all areas

  1. 1 point
    Hi, Try this code: <script language="JavaScript"> function checkAlpha1(v_plate){ if(v_plate.value.match(/[^0-9A-Z]|Q|O/)){ alert("Only capital letters or numbers are allowed in this field"); return false; } return true; } function checkAlpha2(v_plate){ if(v_plate.value.match(/[^0-9A-Z]|Q|O/)){ alert("Only capital letters or numbers are allowed in this field"); return false; } return true; } document.getElementById('Submit').onclick = function(){ if(!checkAlpha1(document.getElementById('INSERT_YOUR_FIELD_1_ID_HERE'))) return false; if(!checkAlpha2(document.getElementById('INSERT_YOUR_FIELD_2_ID_HERE'))) return false; } </script> And replace INSERT_YOUR_FIELD_1_ID_HERE and INSERT_YOUR_FIELD_2_ID_HERE with your field ids. Also change criterias in the script for fields, as you need. Let me know if this helps.
×
×
  • Create New...