I have a div name uploadBiodata_manual_+(count).within that div i have a file type input with id 'file_uploadBiodata_manual_+(count)'.Here how to check div is visible or not.?and if div is visible how to check the file type input has file?
2 Answers
you could just check for div display property along with input file type's value property, like:
if(document.getElementById("your_div_id").style.display != "none") {
//its visible
//check if input fie type has file selected
if(document.getElementById("your_file_input_id").value != "") {
//its has file selected
}
}
1 Comment
Juan Solano
What if the parent is the one that has the visibility none
document.getElementById("myElement").style["display"] == "none";