function validateId(inputId, isZero) {

	var isError = true;
    var x = inputId.value;

    if (x==null || x=="") {
    	if(isError) {
    		inputId.focus();
    		inputId.scrollIntoView();
    	}
    	inputId.style.border = "1px solid red";
        isError = false;
    } else {
    	inputId.style.border = "";
    }

    if (isZero && x=="0") {
		console.log("0 is error. name=" + inputId.name);
		inputId.focus();
		inputId.scrollIntoView();
		inputId.style.border = "1px solid red";
		isError = false;
    }

    return isError;
}
/*
 * Validate input or select by ID
 * isZero if can check 0
 */
Validate input or select by ID
isZero if can check 0
Validate input or select by ID isZero if can check 0
function validateId(inputId, isZero) {
	var isError = true;
    var x = inputId.value;
    if (x==null || x=="") {
    	if(isError) {
    		inputId.focus();
    		inputId.scrollIntoView();
    	}
    	inputId.style.border = "1px solid red";
        isError = false;
    } else {
    	inputId.style.border = "";
    }
    if (isZero && x=="0") {
		console.log("0 is error. name=" + inputId.name);
		inputId.focus();
		inputId.scrollIntoView();
		inputId.style.border = "1px solid red";
		isError = false;
    }
    return isError;
}
function validateId ( inputId , isZero ) { var isError = true ; var x = inputId . value ; if ( x == null || x == "" ) { if ( isError ) { inputId . focus ( ) ; inputId . scrollIntoView ( ) ; } inputId . style . border = "1px solid red" ; isError = false ; } else { inputId . style . border = "" ; } if ( isZero && x == "0" ) { console . log ( "0 is error. name=" + inputId . name ) ; inputId . focus ( ) ; inputId . scrollIntoView ( ) ; inputId . style . border = "1px solid red" ; isError = false ; } return isError ; }
Validate input or select by ID
 isZero if can check 0
Validate input or select by ID isZero if can check 0