title: Why am I getting an unexpected token error in jQuery 1.4.4.min file?
body: <p>Why am I getting this error:</p>
  
  <pre><code>Uncaught SyntaxError: Unexpected token &lt;
  c.b.extend.globalEval                          jquery-1.4.4.min.js:32
  c.extend.httpData                              jquery-1.4.4.min.js:144
  c.extend.ajax.L.w.onreadystatechange           jquery-1.4.4.min.js:140
  </code></pre>
  
  <p>This error doesn't point me to a place in my JS that is triggering this issue. Just the jQuery min file.</p>
  
  <p>How do I debug this and fix it ?</p>
  
  <p>Edit1: Here are some screenshots of my call stack around this error. Still not sure though, which file has the syntax error that is being called by jQuery.</p>
  
  <p><img src="https://i.stack.imgur.com/r6VBL.png" alt="enter image description here">
  <img src="https://i.stack.imgur.com/tYOXW.png" alt="enter image description here">
  <img src="https://i.stack.imgur.com/1RVm8.png" alt="enter image description here"></p>
  
  <p>Edit 2:</p>
  
  <p>Here are some of my AJAX calls:</p>
  
  <pre><code>$('form#project-ajax-form').submit(function(){
      if(compv.steps.selectedClient.id != null){
      $('input#project_client_id').val(compv.steps.selectedClient.id);
          console.debug("Project Client Value: " + $('input#project_client_id').val());
          return true;
      }
      console.debug("Project Client Value not found");
      compv.tools.clientError();
      return false;
  });    
  $('#project-ajax-form')
          .bind("ajax:success", function(evt, data, status, xhr){
          compv.updateStepView('project', xhr);
  });
  
  $('#client-ajax-form')
      .bind("ajax:success", function(evt, data, status, xhr){
      console.log("Calling Step View");
      compv.updateStepView('client', xhr);
  });
  
  $('form#stage-ajax-form').submit(function(){
  if(compv.steps.selectedProject.id != null){
  $('input#stage_project_id').val(compv.steps.selectedProject.id);
      console.debug("Stage Project Value: " + $('input#stage_project_id').val());
      return true;
  }
  console.debug("Stage Project Value not found");
  compv.tools.clientError();
  return false;
  });
  $('#stage-ajax-form')
      .bind("ajax:success", function(evt, data, status, xhr){
      compv.updateStepView('stage', xhr);
  });
  
  $.ajaxSetup({
    beforeSend: function(xhr) {
      xhr.setRequestHeader("Accept", "text/javascript");
    }
  });
  
  $('.ajax-form')
  .bind("ajax:success", function(evt, data, status, xhr){
    var $form = $(this);
      console.log("Form Success: %s", $(this).attr('id'));
  
    // Reset fields and any validation errors, so form can be used again, but leave hidden_field values intact.
    $form.find('textarea,input[type="text"],input[type="file"]').val("");
    $form.find('div.validation-error').empty();
  })
  .bind("ajax:failure", function(evt, xhr, status, error){
    var $form = $(this),
        errors,
        errorText;
      console.log("Form Failure: %s", $(this).attr('id'));
  
    try {
      // Populate errorText with the comment errors
      errors = $.parseJSON(xhr.responseText);
    } catch(err) {
      // If the responseText is not valid JSON (like if a 500 exception was thrown), populate errors with a generic error message.
      console.error("Server Error for Form: %s", $(this).attr('id'));
      errors = {"Server Error": "Please reload the page and try again"};
    }
  
    // Build an unordered list from the list of errors
    errorText = "There were errors: \n&lt;ul&gt;";
  
    for ( error in errors ) {
      errorText += "&lt;li&gt;" + error + ': ' + errors[error] + "&lt;/li&gt; ";
    }
  
    errorText += "&lt;/ul&gt;";
  
    // Insert error list into form
    var errorDiv = $form.find("div.validation-error");
    errorDiv.html(errorText);
    errorDiv.show(300);
  });
  </code></pre>