View Single Post
  #2 (permalink)  
Old Jan 25th, 2006, 11:28
benbacardi's Avatar
benbacardi benbacardi is offline
Highly Reputable Member
Join Date: Feb 2004
Location: United Kingdom
Age: 20
Posts: 611
Thanks: 0
Thanked 0 Times in 0 Posts
Re: 2 similar input validations on one form

can you not just add a couple of lines to your code to make:

Code: Select all
function ValidateForm(){
    var dt=document.startDateForm.projectStartFromDate
    if(dt.value == '') return true;
    else if(isDate(dt.value)==false){
        dt.focus()
        return false
    }
    var dt2=document.startDateForm.projectStartToDate
    if(dt2.value == '') return true;
    else if(isDate(dt2.value)==false){
        dt2.focus()
        return false
    }
    return true
 }
Reply With Quote