Jump to content

Leaderboard

Popular Content

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

  1. Figured it out! I modified script I found in another reply to include checking for the day. My script checks that the date is after today, and it is not a Saturday, Sunday or Monday. function checkStart() { var v_sDate = document.getElementById("InsertRecordBooking_Date").value; var sDate = new Date(v_sDate); var nDate = new Date(); nDate = Date.now(); var setToday = sDate.getDate() + 1; sDate.setDate(setToday); var setDay = sDate.getDay(); if (sDate<nDate) { alert("Your requested lesson date is before today."); return false;
    1 point
  2. 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
    1 point
×
×
  • Create New...