• Categories
    • PHP
    • phpMyAdmin
    • PHPMailer
    • FFMpeg
    • PHPEXcel
    • PHPDoc
    • PHPUnit
    • CakePHP
    • CakePHP 2.0
    • Cake PHP 2.1
    • CakePHP Model
    • Facebook PHP SDK
    • composer-php
    • PHP 7
    • PHP GD
    All Categories
  • About

AJAX call fails with SyntaxError: Unexpected end of JSON input

javascriptphpjqueryajax


PHP Snippet 1:

var data = {};
 data['rawFiles'] =$('#projectIDs').val(); 
 data['metadata'] = $('#getData').val();
  data['type']=  $('#submitType').val();
  data['pid']='csv';
   data['command']='data/qcTest'

PHP Snippet 2:

$.ajax({type: "POST", url: posturl, data: JSON.stringify(data), dataType: 'json'})

Related Snippets

How to override header set in Apache config with more specific header in a virtual host

The sum of the user's points

Edit XML in HTML form and submit to self

Dropdown with current value from Mysql

Navigation idle on content download

PHP mail function is sending blank message body

Sentry on Symfony: how to exclude `NotFoundHttpException`

How to change product Image when variables are selected in Shop and Archive Pages?

Transform array, set each array element with parent key php

PHPMetrics option --excluded-dirs="myfolder" : myfolder dir is not excluded within docker

cakephp save drag and drop list order to database

Image upload not working through ajax Laravel

Access denied for user 'homestead'@'localhost' (using password: YES)

How to write PHP in XSLT

PHP error: "The zip extension and unzip command are both missing, skipping."

About Contact Privacy policy Terms and conditions