title: Uncaught SyntaxError: Invalid regular expression flags
body: <p>I can't get it,
  I must have missed something.. </p>
  
  <p>The code looks good according to me</p>
  
  <pre><code>$(document).on("click", "#addo-0", function() {
      var file_data = $("#visual_image").prop("files")[0];   
      var form_data = new FormData();                  
      form_data.append("file", file_data)               
      $.ajax({
                  url: "/add_file.php?table=visuals",
                  dataType: "script",
                  cache: false,
                  contentType: false,
                  processData: false,
                  data: form_data,                         
                  type: "post"
         })
  </code></pre>
  
  <p>And it works well in a way that it does the job..
  But I get this nasty error:</p>
  
  <pre><code>Uncaught SyntaxError: Invalid regular expression flags
  </code></pre>
  
  <p>Did I make something wrong ? Any ideas ?</p>