Can anybody let me know if there is anything wrong with the following code. I'm trying to get the value of a input type="file" form tag but the alert keeps telling me it's empty
$('#submitForm').bind("click",function(){
var imgVal = $('#imageUpload').val();
alert(imgVal);
return false;
});
<input name="imageUpload" id="imageUpload" type="file" value="" class="text"/>
<input name="submit" type="submit" id="submitForm" value="Submit Photo" />
Thanks in advance
James