• 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

Prestashop webservice API creating cart rules

What will the best solution for this multiple optional filter?

Laravel Mix Uncaught ReferenceError: $ is not defined

How to get variable from JavaScript to PHP [duplicate]

Laravel 5: Is there a non-case sensitive way to sort a collection by an attribute?

Getting output of MS stored procedure on php call

PHPExcel file download using AJAX call

MySQL/PHP - Web Based Game -User specific inventory table or 1 giant table? Another option?

Laravel Livewire: jQuery not working in child component loaded via @if statement

Creating command to backup MySql database in Laravel

How to Display Data in Yajra Datatables Laravel 7?

Navigation idle on content download

ldap is missing from system when installing adldap2 in laravel

How to use functions that are declared in snippets in Evolution CMS (Modx) in an external PHP Script?

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

About Contact Privacy policy Terms and conditions