• 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 prevent phpmailer sending embedded image as an attachment on Gmail?

I want a way to give path to my files which are outside of public folder in laravel

httpd.conf on Windows: can't locate API model structure `php8_module`

Add and update products to session cart in Laravel

How to set dynamic `home` and `siteurl` in WordPress?

Laravel excel maatwebsite 3.1 import, date column in excel cell returns as unknown format number. How to solve this?

Pages are working fine on localhost but not running on the hosting server

Why does codeigniter & Linux server throws unserialize() session data error when user tries to login

MySQL order by field in Eloquent

api response laravel doesn't show

Submitting a form with ajax in Wordpress

PHPSpreadsheet - How Do I Use Auto Migration Tool

Facebook PHP SDK - will not logout properly

Send same name multiple checkbox values via ajax

How to create a video stream from a single dynamic image in PHP

About Contact Privacy policy Terms and conditions