TextDiffViewer/TextDiffViewer/ClientScript.js
//validation of buttons, checkbox and radio buttons when all files are not uploaded!!!

validation of buttons, checkbox and radio buttons when all files are not uploaded
validation of buttons checkbox and radio buttons when all files are not uploaded
function validation() {
    if (radioIndividualSelection) {
        var valfirst = document.getElementById("txtSourceOld").value;
        var valsecond = document.getElementById("txtSourceNew").value;
        var valfirstUpload = document.getElementById("fileUploadOld").value;
        var valSecondUpload = document.getElementById("fileUploadNew").value;
        if ((valfirst == null || valfirst == "") && (valfirstUpload == null || valfirstUpload == "")) {
            document.getElementById("spnFirstName").innerHTML = "* Please select two files for comparision!!!";
            return false;
        }
        else if ((valsecond == null || valsecond == "") && (valSecondUpload == null || valSecondUpload == "")) {
            document.getElementById("spnFirstName").innerHTML = "* Please select two files for comparision!!!";
            return false;
        }
        else
            return true;
    } else {
        var valLaodFile = document.getElementById("txtSourceLoadFile").value;
        var valLoadFileUpload = document.getElementById("fileUploadLoad").value;
        if ((valLoadFileUpload == null || valLoadFileUpload == "") && (valLoadFileUpload == null || valLoadFileUpload == "")) {
            document.getElementById("spnFirstName").innerHTML = "* Please select a file with address of text files to compare!!!";
            return false;
        } else
            return true;
    }
}
function validation ( ) { if ( radioIndividualSelection ) { var valfirst = document . getElementById ( "txtSourceOld" ) . value ; var valsecond = document . getElementById ( "txtSourceNew" ) . value ; var valfirstUpload = document . getElementById ( "fileUploadOld" ) . value ; var valSecondUpload = document . getElementById ( "fileUploadNew" ) . value ; if ( ( valfirst == null || valfirst == "" ) && ( valfirstUpload == null || valfirstUpload == "" ) ) { document . getElementById ( "spnFirstName" ) . innerHTML = "* Please select two files for comparision!!!" ; return false ; } else if ( ( valsecond == null || valsecond == "" ) && ( valSecondUpload == null || valSecondUpload == "" ) ) { document . getElementById ( "spnFirstName" ) . innerHTML = "* Please select two files for comparision!!!" ; return false ; } else return true ; } else { var valLaodFile = document . getElementById ( "txtSourceLoadFile" ) . value ; var valLoadFileUpload = document . getElementById ( "fileUploadLoad" ) . value ; if ( ( valLoadFileUpload == null || valLoadFileUpload == "" ) && ( valLoadFileUpload == null || valLoadFileUpload == "" ) ) { document . getElementById ( "spnFirstName" ) . innerHTML = "* Please select a file with address of text files to compare!!!" ; return false ; } else return true ; } }
validation of buttons, checkbox and radio buttons when all files are not uploaded!!
validation of buttons checkbox and radio buttons when all files are not uploaded!!
//      alert(   "A file is required to compare");
 //      alert(   "A file is required to compare");
 //      alert(   "A file is required to compare");
