Jquery $.post issue
<p>I have below code that reads file name after browse and sends it to another page using POST. if i have alert after $.post, then it works fine. If I remove the alert message, then post is not forwarding the file name to another page. </p>

<pre><code>&lt;input type="file" name="fileupload" id="fileupload" value=""&gt;
</code></pre>

<p>// Jquery code</p>

<pre><code>$("#fileupload").change(function() {
    if ($("#fileupload").val().length &gt; 0) {
        $.post("ReadExcel.jsp", {
            filename: $("#fileupload").val(),
            processId: &lt; %= processId % &gt;
        });
        alert($("#fileupload").val()); // **If I remove this alert, then the code doesn't works** 
    }
    location.reload();
});​
</code></pre>
