I am trying to send uploaded file name to another file if the size of the fileupload text is not zero. I tried below code and it didn't work. I want to send the file name if the browse button is clicked and file name is selected.. help plz?
<input type="file" name="fileupload" id="fileupload" value="">
$(document).ready(function () {
$("#fileupload").click(function(){
if(fileupload>0)
{
$.post("ReadExcel.jsp", {"filename": $("#fileupload").val()});
$.post("ReadExcel.jsp", {"processId": processId });
alert($("#fileupload").val());
}
});
});