Help Please....File Upload validation
Hello,
I am very new to jQuery and i need to transform some javascript to jQuery. I am trying to validate if a file has been attached on an input type=file. I was able to do this with javascript by using:
attach=document.getElementById('Q3812').value;
and using an if statement to check if attach==""
This code apprantly Does Not work in jQuery.
The variable attach(below) is always undefined whether a file has been attached or not. So i am not sure if i have the correct syntax for what I am trying to accomplish.
Your assistance is much appreciated.
<div id="attach2" style="DISPLAY: block"><input name="Q3812" type="file" id="Q3812" /></div>
var attach=thisForm().jQueryObj().find("#Q3812").val();
alert(attach);