Title: Javascript error when trying to add file
Last modified: September 1, 2016

---

# Javascript error when trying to add file

 *  Resolved [rohitmanglik](https://wordpress.org/support/users/rohitmanglik/)
 * (@rohitmanglik)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/javascript-error-when-trying-to-add-file/)
 * After I select a file by clicking on Browse Button, I am getting following javascript
   error:
 * VM1615:1 Uncaught SyntaxError: Unexpected token { in JSON at position 336success
   @ ultimate-importer-free.js?ver=4.5.3:6i
 * Now the next button doesn’t enable at all.
 * It was working fine in my system till now. I am using Chrome Browser.
 * I have minification enabled so cannot tell the exact place but it should be somewhere
   over here:
 *     ```
       success: function(data) {
                       var fileobj = JSON.parse(data);
                       jQuery.each(fileobj, function(objkey, objval) {
                           jQuery.each(objval, function(o_key, file) {
                               document.getElementById('uploadFileName').value = file.name;
                               var filewithmodule = file.uploadedname.split(".");
                               var check_file = filewithmodule[filewithmodule.length - 1];
                               if (check_file != "csv" && check_file != "txt") {
                                   alert(wp_ultimate_translate_importer.fileformatmsg);
                                   return false;
                               }
       ```
   
 * I cleared all my cache but no success.
 * [https://wordpress.org/plugins/wp-ultimate-csv-importer/](https://wordpress.org/plugins/wp-ultimate-csv-importer/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [smacksupport](https://wordpress.org/support/users/smacksupport/)
 * (@smacksupport)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/javascript-error-when-trying-to-add-file/#post-7679271)
 * Kindly do share us your details to support(at)smackcoders(dot)com. Need to check
   in your environment. We will help you to fix this issue.
 *  Thread Starter [rohitmanglik](https://wordpress.org/support/users/rohitmanglik/)
 * (@rohitmanglik)
 * [9 years, 9 months ago](https://wordpress.org/support/topic/javascript-error-when-trying-to-add-file/#post-7679367)
 * #resolved
 *  [timarsen](https://wordpress.org/support/users/timarsen/)
 * (@timarsen)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/javascript-error-when-trying-to-add-file/#post-8249008)
 * It’d be nice if you actually shared how this issue was fixed!

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Javascript error when trying to add file’ is closed to new replies.

 * ![](https://ps.w.org/wp-ultimate-csv-importer/assets/icon.svg?rev=3131703)
 * [WP Ultimate CSV Importer – Import CSV, XML & Excel into WordPress](https://wordpress.org/plugins/wp-ultimate-csv-importer/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-ultimate-csv-importer/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-ultimate-csv-importer/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-ultimate-csv-importer/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-ultimate-csv-importer/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-ultimate-csv-importer/reviews/)

 * 3 replies
 * 3 participants
 * Last reply from: [timarsen](https://wordpress.org/support/users/timarsen/)
 * Last activity: [9 years, 7 months ago](https://wordpress.org/support/topic/javascript-error-when-trying-to-add-file/#post-8249008)
 * Status: resolved