Given the element below ("FileToUpload"), how do I test if its class is set to block or none?
HTML
<div id=\ "FileToUploadLabel\">File:</td>
<td colspan=\ "1\">
</div>
<input type=\ "file\" id=\ "FileToUpload\" name=\ "FileToUpload\" size=\ "70\"/>
JS
//To show the file control:
$("#FileToUpload").css("display", "block");
//To hide the file control:
$("#FileToUpload").css("display", "none");
Basically I need to test it in a conditional statement like this:
if ("FileToUpload not hidden" && $("#FileToUpload").val() == "")
{
Alert("An file needs to be uploaded when File tag is being displayed.");
return;
}
Thank you