I have a button Upload where in file will be uploaded, But the requirement is when is selected a file and then press Upload button.The button should be disabled until the process occurs with complete validation issues.
The code i have written is shown below.
<form id='FM_EmployeeUpload' name='FM_EmployeeUpload' method='post' action='new_S_EmployeeUpload.php' enctype='multipart/form-data'>
echo('<input type="submit" class="btn btn-lg pull-left" name="submit" onClick="DisableButton();" id="Upload" value="UPLOAD"/> ');
</form>
function DisableButton(){
document.getElementById("Upload").disabled = true;
}
Now the problem arises with the Browsers when i do this task on Firefox if there is error in uploading the file Validation issues will takes place and it will work perfect.The screen shot is shown below.
But the same code i run in Google Chrome No validation nothing will happen ony the button will e disabled
some what looks like this.
What is the main issue regarding the problem. Any help appreciated.