• 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 retrieve the first and last instance of a row in pdo dataset

Open a popup box after receiving result from ajax

Split comma separated value from table column into rows using mysql?

MySQL - Connection failed: No route to host

Laravel implode array items to new lines

(PHPUnit) PHP Fatal error: Uncaught Error: Call to undefined function each()

possible options to create pdf file using html elements to generate invoice in php and codeigniter

Star and Half Star Rating in Laravel

How to run a shell as root from php (apache)

jQuery Ajax Post with data

how to search for a file with php

Custom Button next to “ADD TO CART” button of WooCommerce based on Product Type

How to connect to MSSQL Server with PHP from Ubuntu 18.04?

Symfony - "framework.test" config is not set to true

php code to send checkbox form results to email

About Contact Privacy policy Terms and conditions