First I want to validate some of the field values entered or not. After that When i click the submit button, the button must be disabled after one click to avoid duplicate submission. How to do that using javascript?
<script type="text/javascript" language="javascript">
function ValidateIt() {
if (document.getElementById('ddlProblemCategory').value == 0) {
alert("Please fill some value");
return false;
}
return true;
}
function DisableIt() {
if (ValidateIt() == true)
document.getElementById('btnSaveProblem').disabled = true;
}
</script>