• 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

Laravel lang slug in url

PHP password_verify

jQuery Ajax Post with data

how to use extended ASCII instead of unicode in PHP

How to get quarter for future date using Carbon?

Clear javascript source cache laravel 5.8

get data-value with variable value

Laravel Get Days In Month From Month Number?

How to downgrade or install a specific version of Composer?

Fatal error: [] operator not supported for strings

Issue saving card for customer

PHP's array_map including keys

Creating a config file in PHP

Custom post type single page not working

How to get AJAX to post on second page?

About Contact Privacy policy Terms and conditions