Article From:

It’s a data type problem, so specify text.

$(function() {
            $("#submitbtn").click(function() {
                var file = $("#file_upload").val();                                
                if (file == '') {
                    alert("Upload template cannot be empty");
                    return false;
                       url: "${pageContext.request.contextPath}/inventoryController/importinventory.form",
                       fileElementId: 'file_upload',
                       dataType: 'text',
                       success: function (data) {
                             /* if(data=='Field '{Alert ('List Import Successful! ).Location.rEload ();}else{Alert ('List import failed, please check the file');}*/
                        error: function (data, status, e) {                            
                            alert('Callback failure');


Leave a Reply

Your email address will not be published. Required fields are marked *